mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-02 19:51:36 +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>
36 lines
1010 B
Bash
Executable File
36 lines
1010 B
Bash
Executable File
#!/usr/bin/env bats
|
|
|
|
load "../testlib"
|
|
|
|
test_setup() {
|
|
|
|
create_test_environment "$TEST_NAME"
|
|
test_files=/usr/bin/1,/usr/bin/2,/usr/bin/3,/usr/bin/4,/usr/bin/5,/usr/bin/6,/usr/bin/7,/usr/bin/8,/usr/bin/9,/usr/bin/10
|
|
create_bundle -n test-bundle1 -f "$test_files" "$TEST_NAME"
|
|
create_bundle -n test-bundle2 -f /media/lib/file2 "$TEST_NAME"
|
|
|
|
}
|
|
|
|
@test "ADD020: Adding multiple bundles using packs" {
|
|
|
|
run sudo sh -c "$SWUPD bundle-add $SWUPD_OPTS test-bundle1 test-bundle2"
|
|
|
|
assert_status_is 0
|
|
assert_dir_exists "$TARGETDIR/usr/bin"
|
|
assert_dir_exists "$TARGETDIR/media/lib"
|
|
assert_file_exists "$TARGETDIR/usr/bin/10"
|
|
assert_file_exists "$TARGETDIR/media/lib/file2"
|
|
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 2 bundles
|
|
EOM
|
|
)
|
|
assert_is_output "$expected_output"
|
|
|
|
}
|