mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-10-03 23:38:25 +00:00
test: Test install time option for bundleadd
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
This commit is contained in:
committed by
Otavio Pontes
parent
14df661f27
commit
5cb094e1b1
@@ -122,6 +122,7 @@ BATS = \
|
||||
test/functional/bundleadd/add-directory.bats \
|
||||
test/functional/bundleadd/add-fall-back-to-fullfile.bats \
|
||||
test/functional/bundleadd/add-include.bats \
|
||||
test/functional/bundleadd/add-install-time.bats \
|
||||
test/functional/bundleadd/add-multiple.bats \
|
||||
test/functional/bundleadd/add-no-signature.bats \
|
||||
test/functional/bundleadd/add-skip-scripts.bats \
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load "../testlib"
|
||||
|
||||
test_setup() {
|
||||
|
||||
create_test_environment "$TEST_NAME"
|
||||
create_bundle -n bundle1 -f /file1,/file2 "$TEST_NAME"
|
||||
|
||||
}
|
||||
|
||||
@test "ADD030: Add a bundle showing detailed installation time" {
|
||||
|
||||
run sudo sh -c "$SWUPD bundle-add $SWUPD_OPTS bundle1 -t"
|
||||
|
||||
assert_status_is 0
|
||||
|
||||
expected_output=$(cat <<-EOM
|
||||
Starting download of remaining update content. This may take a while...
|
||||
Finishing download of update content...
|
||||
Installing bundle\(s\) files...
|
||||
Calling post-update helper scripts.
|
||||
Successfully installed 1 bundle
|
||||
Raw elapsed time stats:
|
||||
.* ms: Total execution time
|
||||
.* ms: Prepend bundles to list
|
||||
.* ms: Install bundles
|
||||
.* ms: Add bundles and recurse
|
||||
.* ms: Consolidate files from bundles
|
||||
.* ms: Check disk space availability
|
||||
.* ms: Download packs
|
||||
.* ms: Download missing files
|
||||
.* ms: Installing bundle\(s\) files onto filesystem
|
||||
.* ms: Run Scripts
|
||||
CPU process time stats:
|
||||
.* ms: Total execution time
|
||||
.* ms: Prepend bundles to list
|
||||
.* ms: Install bundles
|
||||
.* ms: Add bundles and recurse
|
||||
.* ms: Consolidate files from bundles
|
||||
.* ms: Check disk space availability
|
||||
.* ms: Download packs
|
||||
.* ms: Download missing files
|
||||
.* ms: Installing bundle\(s\) files onto filesystem
|
||||
.* ms: Run Scripts
|
||||
EOM
|
||||
)
|
||||
|
||||
assert_regex_is_output "$expected_output"
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user