diff --git a/cli/genpolicy/genpolicy_test.go b/cli/genpolicy/genpolicy_test.go index afb749a11e..2408f882ab 100644 --- a/cli/genpolicy/genpolicy_test.go +++ b/cli/genpolicy/genpolicy_test.go @@ -73,7 +73,7 @@ func TestRunner(t *testing.T) { yamlPath, err := os.ReadFile(yamlPathFile) require.NoError(err) - assert.Equal(expectedYAMLPath, string(yamlPath)) + assert.YAMLEq(expectedYAMLPath, string(yamlPath)) require.NoError(r.Teardown()) } diff --git a/e2e/internal/contrasttest/contrasttest.go b/e2e/internal/contrasttest/contrasttest.go index ed3ad07c36..8b79e1547d 100644 --- a/e2e/internal/contrasttest/contrasttest.go +++ b/e2e/internal/contrasttest/contrasttest.go @@ -67,9 +67,9 @@ func (ct *ContrastTest) Init(t *testing.T, resources []any) { require := require.New(t) f, err := os.Open(ct.ImageReplacementsFile) - require.NoError(err, fmt.Sprintf("Image replacements %s file not found", ct.ImageReplacementsFile)) + require.NoError(err, "Image replacements %s file not found", ct.ImageReplacementsFile) ct.ImageReplacements, err = kuberesource.ImageReplacementsFromFile(f) - require.NoError(err, fmt.Sprintf("Parsing image replacements from %s failed", ct.ImageReplacementsFile)) + require.NoError(err, "Parsing image replacements from %s failed", ct.ImageReplacementsFile) // If available, acquire a fifo ticket to synchronize cluster access with // other running e2e tests. We request a ticket and wait for our turn.