From 58d6a78f86f179967199855f54fad2743bbffca6 Mon Sep 17 00:00:00 2001 From: David Gageot <david@gageot.net> Date: Thu, 16 May 2019 14:10:36 +0200 Subject: [PATCH] Fix linter error ``` RUN hack/linter.sh cmd/skaffold/app/flags/build_output_test.go:99:5: ST1017: don't use Yoda conditions (stylecheck) if "test.in" != flag.String() { ^ FAILED hack/linter.sh ``` Signed-off-by: David Gageot <david@gageot.net> --- cmd/skaffold/app/flags/build_output_test.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/cmd/skaffold/app/flags/build_output_test.go b/cmd/skaffold/app/flags/build_output_test.go index 4d18d26a38c..7627a11320a 100644 --- a/cmd/skaffold/app/flags/build_output_test.go +++ b/cmd/skaffold/app/flags/build_output_test.go @@ -96,15 +96,7 @@ func TestBuildOutputSet(t *testing.T) { func TestBuildOutputString(t *testing.T) { flag := NewBuildOutputFileFlag("test.in") - if "test.in" != flag.String() { - t.Errorf("Flag String() does not match. Expected test.in, Actual %s", flag.String()) - } -} -func TestBuildOutputType(t *testing.T) { - flag := NewBuildOutputFileFlag("test.in") - expectedFlagType := "*flags.BuildOutputFileFlag" - if flag.Type() != expectedFlagType { - t.Errorf("Flag returned wrong type. Expected %s, Actual %s", expectedFlagType, flag.Type()) - } + testutil.CheckDeepEqual(t, "test.in", flag.String()) + testutil.CheckDeepEqual(t, "*flags.BuildOutputFileFlag", flag.Type()) }