Update swupd unit test

"bundle-add" sub-command used to validate "list" option in a unit test,
now that option is part of "bundle-list" sub-command with a new
name: [-a, all], for this reason the test has been updated in order to
validate it using "bundle-list" sub-command.

Furthermore this test has been moved to new directory called
"bundlelist/all" this in order to keep source code integrity.

Signed-off-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
This commit is contained in:
Mario Alfredo Carrillo Arevalo
2017-01-31 12:38:29 -08:00
committed by tmarcu
parent f3c053f782
commit b49fb6419b
17 changed files with 59 additions and 3 deletions
+1 -1
View File
@@ -145,8 +145,8 @@ dist_check_SCRIPTS = \
test/functional/bundleadd/boot-file/test.bats \
test/functional/bundleadd/include/test.bats \
test/functional/bundleadd/fix-missing-file/test.bats \
test/functional/bundleadd/list/test.bats \
test/functional/bundleadd/verify-fix-path/test.bats \
test/functional/bundlelist/all/test.bats \
test/functional/bundleremove/boot-file/test.bats \
test/functional/bundleremove/include/test.bats \
test/functional/bundleremove/parse-args/test.bats \
@@ -0,0 +1,2 @@
Attempting to download version string to memory
os-core
@@ -13,8 +13,8 @@ teardown() {
clean_tars 10
}
@test "bundle-add list bundles" {
run sudo sh -c "$SWUPD bundle-add $SWUPD_OPTS --list"
@test "bundle-list all bundles" {
run sudo sh -c "$SWUPD bundle-list --all"
check_lines "$output"
}
@@ -0,0 +1,9 @@
NAME="Clear Linux Software for Intel Architecture"
VERSION=1
ID=clear-linux-os
VERSION_ID=10
PRETTY_NAME="Clear Linux Software for Intel Architecture"
ANSI_COLOR="1;35"
HOME_URL="https://clearlinux.org"
SUPPORT_URL="https://clearlinux.org"
BUG_REPORT_URL="https://bugs.clearlinux.org/jira"
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bats
load "../../swupdlib"
setup() {
clean_test_dir
create_manifest_tar 10 MoM
sign_manifest_mom 10
create_manifest_tar 10 os-core
}
teardown() {
clean_tars 10
}
@test "bundle-list all bundles" {
run sudo sh -c "$SWUPD bundle-list --all"
check_lines "$output"
}
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80
@@ -0,0 +1,8 @@
MANIFEST 3
version: 10
previous: 0
filecount: 1
timestamp: 1451940175
contentsize: 13805671819
M... 6259043bcbac93ffff65097ec52ba0e8658e8b2b7cdb99bd2939d639ee23209e 10 os-core
@@ -0,0 +1,3 @@
-----BEGIN PKCS7-----
Empty
-----END PKCS7-----
@@ -0,0 +1,8 @@
MANIFEST 3
version: 10
previous: 0
filecount: 1
timestamp: 1451936779
contentsize: 17929151
D... a4d8955d9952c3fcb2241b0f8d225205a5861cec9757b3a075d34810da9b08af 10 /usr/bin
@@ -0,0 +1,3 @@
-----BEGIN PKCS7-----
Empty
-----END PKCS7-----