Files
swupd-client/test/functional/bundlelist/list-deps-flat.bats
Castulo Martinez db033b1d6b Show spinner when loading manifests in bundle-list
For some options of bundle-list, like --deps and --has-dep, we sometimes
need to download a considerable amount of manifests, if that happens
swupd just seems to hang for some time, this time could be considerably
in slow networks.

This commit enables the spinner while the manifests are baing downloaded
during a bundle-list operation so users know swupd is not hung and it is
doing some downloading.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-01-03 14:29:11 -08:00

35 lines
853 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"
create_bundle -n test-bundle2 -f /foo "$TEST_NAME"
create_bundle -n test-bundle3 -f /foo "$TEST_NAME"
# add bundle2 and 3 as dependencies of bundle1
add_dependency_to_manifest "$TEST_NAME"/web-dir/10/Manifest.test-bundle1 test-bundle2
add_dependency_to_manifest "$TEST_NAME"/web-dir/10/Manifest.test-bundle1 test-bundle3
}
@test "LST006: List bundle's dependencies when bundle has flat dependencies" {
run sudo sh -c "$SWUPD bundle-list $SWUPD_OPTS --deps test-bundle1"
assert_status_is 0
expected_output=$(cat <<-EOM
Loading required manifests...
Bundles included by test-bundle1:
- test-bundle2
- test-bundle3
Total: 2
EOM
)
assert_is_output --identical "$expected_output"
}