Update testcases to reflect new info format

Signed-off-by: Brandon Hong <brandon.hong@intel.com>
This commit is contained in:
Brandon Hong
2019-07-19 10:10:10 -07:00
committed by Otavio Pontes
parent 959941a162
commit b09bdddabe
4 changed files with 9 additions and 0 deletions
@@ -38,6 +38,7 @@ global_teardown() {
expected_output=$(cat <<-EOM
.*/etc/swupd: not a directory
Warning: Unable to set mirror url
Distribution: Clear Linux Software for Intel Architecture
Installed version: 10
Version URL: file://.*/web-dir
Content URL: file://.*/web-dir
@@ -59,6 +60,7 @@ global_teardown() {
expected_output=$(cat <<-EOM
.*/etc/swupd: not a directory
Warning: Unable to set mirror url
Distribution: Clear Linux Software for Intel Architecture
Installed version: 10
Version URL: file://.*/web-dir
Content URL: file://.*/web-dir
@@ -34,6 +34,7 @@ global_teardown() {
assert_status_is 0
expected_output=$(cat <<-EOM
Set upstream mirror to https://example.com/swupd-file
Distribution: Clear Linux Software for Intel Architecture
Installed version: 10
Version URL: https://example.com/swupd-file
Content URL: https://example.com/swupd-file
@@ -54,6 +55,7 @@ global_teardown() {
assert_status_is 0
expected_output=$(cat <<-EOM
Set upstream mirror to https://example.com/swupd-file
Distribution: Clear Linux Software for Intel Architecture
Installed version: 10
Version URL: https://example.com/swupd-file
Content URL: https://example.com/swupd-file
@@ -75,6 +77,7 @@ global_teardown() {
assert_status_is 0
expected_output=$(cat <<-EOM
Set upstream mirror to https://example.com/swupd-file
Distribution: Clear Linux Software for Intel Architecture
Installed version: 10
Version URL: https://example.com/swupd-file
Content URL: https://example.com/swupd-file
+1
View File
@@ -27,6 +27,7 @@ test_setup() {
{ "type" : "info", "msg" : "The --allow-insecure-http flag was used, be aware that this poses a threat to the system " },
{ "type" : "warning", "msg" : "The mirror was set up using HTTP. In order for autoupdate to continue working you will need to set allow_insecure_http=true in the swupd configuration file. Alternatively you can set the mirror using HTTPS (recommended) " },
{ "type" : "info", "msg" : "Set upstream mirror to http://example.com/swupd-file " },
{ "type" : "info", "msg" : "Distribution: Clear Linux Software for Intel Architecture " },
{ "type" : "info", "msg" : "Installed version: 10 " },
{ "type" : "info", "msg" : "Version URL: http://example.com/swupd-file " },
{ "type" : "info", "msg" : "Content URL: http://example.com/swupd-file " },
@@ -170,6 +170,7 @@ global_teardown() {
run sudo sh -c "$SWUPD info $SWUPD_OPTS -v http://anotherurl.com"
assert_status_is "$SWUPD_OK"
expected_output=$(cat <<-EOM
Distribution: Clear Linux Software for Intel Architecture
Installed version: 10
Version URL: http://anotherurl.com
Content URL: http://someurl.com
@@ -205,6 +206,7 @@ global_teardown() {
run sudo sh -c "$SWUPD info $SWUPD_OPTS"
assert_status_is "$SWUPD_OK"
expected_output=$(cat <<-EOM
Distribution: Clear Linux Software for Intel Architecture
Installed version: 10
Version URL: file://$TEST_DIRNAME/web-dir
Content URL: file://$TEST_DIRNAME/web-dir
@@ -225,6 +227,7 @@ global_teardown() {
assert_status_is "$SWUPD_OK"
expected_output=$(cat <<-EOM
Warning: Unrecognized option 'invalid_option=true' from section [global] in the configuration file
Distribution: Clear Linux Software for Intel Architecture
Installed version: 10
Version URL: file://$TEST_DIRNAME/web-dir
Content URL: file://$TEST_DIRNAME/web-dir