Files
swupd-client/test/functional/update/update-use-pack.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.2 KiB
Bash
Executable File

#!/usr/bin/env bats
load "../testlib"
test_setup() {
create_test_environment "$TEST_NAME"
create_version -p "$TEST_NAME" 100 10
update_bundle "$TEST_NAME" os-core --update /core
}
@test "UPD005: Update uses delta packs if available" {
run sudo sh -c "$SWUPD update $SWUPD_OPTS"
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 : 0
deleted files : 0
Validate downloaded files
No extra files need to be downloaded
Installing files...
Update was applied
Calling post-update helper scripts
Update successful - System updated from version 10 to version 100
EOM
)
assert_is_output "$expected_output"
assert_file_exists "$TARGETDIR"/core
# make sure the file was updated correctly
fhash=$(get_hash_from_manifest "$WEBDIR"/100/Manifest.os-core /core)
assert_files_equal "$TARGETDIR"/core "$TEST_NAME"/web-dir/100/files/"$fhash"
}