Merge "Simplify ShowProgress unit test"
This commit is contained in:
commit
cb9396bc80
@ -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")
|
||||
}
|
||||
}
|
||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user