Files
swupd-client/test/functional/update/update-use-full-file.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

47 lines
1.2 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
# remove packs so full file is used
sudo rm -rf "$WEBDIR"/100/pack-*
sudo rm -f "$WEBDIR"/100/delta/*
}
@test "UPD006: Update falls back to using full files if no packs are 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
Starting download of remaining update content. This may take a while...
Installing files...
Update was applied
Calling post-update helper scripts
1 files were not in a pack
Update successful - System updated from version 10 to version 100
EOM
)
assert_is_output "$expected_output"
assert_file_exists "$TARGETDIR"/core
}