mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-07 06:06:14 +00:00
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>
34 lines
849 B
Bash
Executable File
34 lines
849 B
Bash
Executable File
#!/usr/bin/env bats
|
|
|
|
load "../testlib"
|
|
|
|
test_setup() {
|
|
|
|
create_test_environment "$TEST_NAME"
|
|
create_bundle -n test-bundle1 -f /foo "$TEST_NAME"
|
|
|
|
}
|
|
|
|
@test "ADD018: When adding a bundle with less than 10 files, fullfiles should be used" {
|
|
|
|
run sudo sh -c "$SWUPD bundle-add $SWUPD_OPTS test-bundle1"
|
|
|
|
assert_status_is 0
|
|
# validate file is installed in target
|
|
assert_file_exists "$TARGETDIR"/foo
|
|
# validate zero pack was not downloaded
|
|
assert_file_not_exists "$STATEDIR"/pack-test-bundle1-from-0-to-10.tar
|
|
expected_output=$(cat <<-EOM
|
|
Loading required manifests...
|
|
No packs need to be downloaded
|
|
Validate downloaded files
|
|
Starting download of remaining update content. This may take a while...
|
|
Installing files...
|
|
Calling post-update helper scripts
|
|
Successfully installed 1 bundle
|
|
EOM
|
|
)
|
|
assert_is_output "$expected_output"
|
|
|
|
}
|