Fix integration tests EOLs for Windows

This commit is contained in:
Ciprian Hacman 2020-08-11 09:38:09 +03:00
parent 7fcabc107d
commit 2359a25b84
2 changed files with 6 additions and 0 deletions

View File

@ -47,6 +47,9 @@ func TestBuildEtcdManifest(t *testing.T) {
rendered := strings.TrimSpace(string(generated))
expected = strings.TrimSpace(expected)
rendered = strings.Replace(rendered, "\r", "", -1)
expected = strings.Replace(expected, "\r", "", -1)
if rendered != expected {
diffString := diff.FormatDiff(expected, string(rendered))
t.Logf("diff:\n%s\n", diffString)

View File

@ -89,6 +89,9 @@ func runTest(t *testing.T, srcDir string, fromVersion string, toVersion string)
actualString := strings.TrimSpace(strings.Join(actual, "\n---\n\n"))
expectedString := strings.TrimSpace(string(expectedBytes))
actualString = strings.Replace(actualString, "\r", "", -1)
expectedString = strings.Replace(expectedString, "\r", "", -1)
if actualString != expectedString {
diffString := diff.FormatDiff(expectedString, actualString)
t.Logf("diff:\n%s\n", diffString)