Merge "Simplify ShowProgress unit test"

This commit is contained in:
Zuul 2020-10-22 13:49:38 +00:00 committed by Gerrit Code Review
commit cb9396bc80
2 changed files with 1 additions and 10 deletions

View File

@ -19,7 +19,6 @@ import (
"fmt"
"io"
"io/ioutil"
"regexp"
"strings"
"testing"
@ -276,10 +275,6 @@ func TestShowProgress(t *testing.T) {
writer := bytes.NewBuffer(nil)
err = showProgress(reader, writer)
require.NoError(t, err)
expected, err := ioutil.ReadFile(tt.output)
require.NoError(t, err)
space := regexp.MustCompile(`\s+`)
assert.Equal(t, space.ReplaceAllString(string(expected), " "),
space.ReplaceAllString(writer.String(), " "))
assert.Contains(t, writer.String(), "Completed")
}
}

View File

@ -1,4 +0,0 @@
Retrieving base packages ... Done
Completed [----------------------------] 100.00%
Completed [----------------------------] 100.00%
Creating 4.0 filesystem on /root/LIVE_BOOT/image/live/filesystem.squashfs, block size 131072.