replace custom diff in tests using testify (#1215)

This commit is contained in:
Cyril Jouve
2023-12-13 06:32:38 +08:00
committed by GitHub
parent 473820cd6f
commit eb21377f39
15 changed files with 32 additions and 171 deletions
+2 -4
View File
@@ -6,6 +6,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/helmfile/vals"
"github.com/stretchr/testify/assert"
"go.uber.org/zap"
"github.com/helmfile/helmfile/pkg/exectest"
@@ -1399,10 +1400,7 @@ changing working directory back to "/path/to"
if tc.log != "" {
actual := bs.String()
diff, exists := testhelper.Diff(tc.log, actual, 3)
if exists {
t.Errorf("unexpected log for data defined %s:\nDIFF\n%s\nEOD", tc.loc, diff)
}
assert.Equal(t, tc.log, actual, 3)
} else {
testhelper.RequireLog(t, "app_diff_test_1", bs)
}