Files
swupd-client/test/functional/update/update-skip-scripts.bats
Otavio Pontes d2590a1b9e fullfile: Improve output of fullfile downloads
Print a "Validate downloaded files" message to separate 2 different progress bars
and improve the output when downloading extra fullfiles

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-18 09:27:25 -07:00

45 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bats
load "../testlib"
test_setup() {
create_test_environment "$TEST_NAME"
create_version "$TEST_NAME" 100 10
update_bundle "$TEST_NAME" os-core --update /core
update_bundle "$TEST_NAME" os-core --add /testfile
}
@test "UPD033: Updating a system without running the post-update scripts" {
run sudo sh -c "$SWUPD update --no-scripts $SWUPD_OPTS"
# Should still be successful
assert_status_is 0
expected_output=$(cat <<-EOM
Update started
Preparing to update from 10 to 100
Downloading packs for:
- os-core
Finishing packs extraction...
Statistics for going from version 10 to version 100:
changed bundles : 1
new bundles : 0
deleted bundles : 0
changed files : 1
new files : 1
deleted files : 0
Validate downloaded files
No extra files need to be downloaded
Installing files...
Update was applied
Warning: post-update helper scripts skipped due to --no-scripts argument
Update successful - System updated from version 10 to version 100
EOM
)
assert_is_output "$expected_output"
# The file should still be added
assert_file_exists "$TARGETDIR"/testfile
}