From 397d8758af8a385efd58737f9449cefb34060486 Mon Sep 17 00:00:00 2001 From: Icarus Sparry Date: Tue, 26 Sep 2017 12:35:30 -0700 Subject: [PATCH] Update fix-missing-file test to account for progress dots Now we have dots (or percentages) when files are being downloaded these can intermingle with the normal output if they are flushed. Alter the fix-missing-file test to remove dots from the lines to be compared, and alter the lines-checked to add in the lines which would normally be ignored but no longer match due to the missing dots, e.g. "Downloading packs." Signed-off-by: Icarus Sparry --- test/functional/bundleadd/fix-missing-file/lines-checked | 9 +++++++-- test/functional/bundleadd/fix-missing-file/test.bats | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/functional/bundleadd/fix-missing-file/lines-checked b/test/functional/bundleadd/fix-missing-file/lines-checked index 5001003f..2d71a26a 100644 --- a/test/functional/bundleadd/fix-missing-file/lines-checked +++ b/test/functional/bundleadd/fix-missing-file/lines-checked @@ -1,7 +1,12 @@ Attempting to download version string to memory +Downloading packs Retry #1 downloading subscribed packs +Downloading packs Retry #2 downloading subscribed packs +Downloading packs Retry #3 downloading subscribed packs -Installing bundle(s) files... +Downloading packs +Installing bundle(s) files Path /foo is missing on the file system -Bundle(s) installation done. +Calling post-update helper scripts +Bundle(s) installation done diff --git a/test/functional/bundleadd/fix-missing-file/test.bats b/test/functional/bundleadd/fix-missing-file/test.bats index 0afb85b8..f810cf63 100755 --- a/test/functional/bundleadd/fix-missing-file/test.bats +++ b/test/functional/bundleadd/fix-missing-file/test.bats @@ -24,7 +24,7 @@ teardown() { run sudo sh -c "$SWUPD bundle-add $SWUPD_OPTS test-bundle" [ "$status" -eq 0 ] - check_lines "$output" + check_lines "${output//./}" [ -f "$DIR/target-dir/foo" ] }