Files
swupd-client/test/functional/checkupdate/chk-update-version-match.bats
Otavio Pontes b1e849327d testlib: never create test enviroment for the user
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>
2020-04-07 13:52:49 -07:00

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