mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-05 13:11:41 +00:00
Test environment can be created on global_setup() or test_setup() and that change the behavior of several operations on testlib. Because of that, let the user create the test environment as desired instead of forcing it on test_setup() Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
26 lines
412 B
Bash
Executable File
26 lines
412 B
Bash
Executable File
#!/usr/bin/env bats
|
|
|
|
load "../testlib"
|
|
|
|
test_setup() {
|
|
|
|
create_test_environment "$TEST_NAME"
|
|
|
|
}
|
|
|
|
@test "CHK002: Check for available updates when we are at latest" {
|
|
|
|
run sudo sh -c "$SWUPD check-update $SWUPD_OPTS"
|
|
|
|
assert_status_is 1
|
|
expected_output=$(cat <<-EOM
|
|
Current OS version: 10
|
|
Latest server version: 10
|
|
There are no updates available
|
|
EOM
|
|
)
|
|
assert_is_output "$expected_output"
|
|
|
|
}
|
|
#WEIGHT=1
|