mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-05 05:01:40 +00:00
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>
61 lines
1.5 KiB
Bash
Executable File
61 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bats
|
|
|
|
load "../testlib"
|
|
|
|
test_setup() {
|
|
|
|
create_test_environment "$TEST_NAME"
|
|
create_bundle -L -n test-bundle1 -f /foo "$TEST_NAME"
|
|
create_bundle -L -n test-bundle2 -f /foo "$TEST_NAME"
|
|
create_bundle -L -n test-bundle3 -f /foo "$TEST_NAME"
|
|
# add bundle1 as dependencies of bundle2 and bundle 2 as dependency of bundle3
|
|
add_dependency_to_manifest "$TEST_NAME"/web-dir/10/Manifest.test-bundle2 test-bundle1
|
|
add_dependency_to_manifest "$TEST_NAME"/web-dir/10/Manifest.test-bundle3 test-bundle2
|
|
|
|
}
|
|
|
|
@test "LST011: List installed bundles that have a given bundle as dependency (with nested deps)" {
|
|
|
|
run sudo sh -c "$SWUPD bundle-list $SWUPD_OPTS --has-dep test-bundle1"
|
|
|
|
assert_status_is 0
|
|
expected_output=$(cat <<-EOM
|
|
Loading required manifests...
|
|
|
|
Installed bundles that have test-bundle1 as a dependency:
|
|
- test-bundle2
|
|
- test-bundle3
|
|
|
|
Total: 2
|
|
EOM
|
|
)
|
|
assert_is_output --identical "$expected_output"
|
|
|
|
}
|
|
|
|
@test "LST020: List installed bundles that have a given bundle as dependency (with nested deps) in a tree view" {
|
|
|
|
run sudo sh -c "$SWUPD bundle-list --verbose $SWUPD_OPTS --has-dep test-bundle1"
|
|
|
|
assert_status_is 0
|
|
expected_output=$(cat <<-EOM
|
|
Loading required manifests...
|
|
|
|
Installed bundles that have test-bundle1 as a dependency:
|
|
|
|
format:
|
|
# * is-required-by
|
|
# |-- is-required-by
|
|
# * is-also-required-by
|
|
# ...
|
|
|
|
* test-bundle2
|
|
|-- test-bundle3
|
|
|
|
Total: 2
|
|
EOM
|
|
)
|
|
assert_is_output --identical "$expected_output"
|
|
|
|
}
|