From 648c292baaefa02464970a87deaf671dcae19821 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Sun, 17 Sep 2023 02:05:29 +0530 Subject: [PATCH] fix test case Signed-off-by: Shubham Gupta --- pkg/apis/testharness/v1beta1/commands.go | 4 ++-- pkg/apis/testharness/v1beta1/commands_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/apis/testharness/v1beta1/commands.go b/pkg/apis/testharness/v1beta1/commands.go index bf26d4cb..2cb52be4 100644 --- a/pkg/apis/testharness/v1beta1/commands.go +++ b/pkg/apis/testharness/v1beta1/commands.go @@ -43,11 +43,11 @@ func (e *ExpectedOutput) validateOutput(outputType string, actualValue string) e return fmt.Errorf("%s did not match wildcard pattern: %s", outputType, expectedValue) } - case MatchEquals: + case MatchEquals: if actualValue != expectedValue { return fmt.Errorf("expected exact %s: %s, got: %s", outputType, expectedValue, actualValue) } - default: // MatchEquals + default: // Throw an error if we don't recognise the match type return fmt.Errorf("unrecognised match type %s", matchType) } diff --git a/pkg/apis/testharness/v1beta1/commands_test.go b/pkg/apis/testharness/v1beta1/commands_test.go index b4996fa5..50f56f02 100644 --- a/pkg/apis/testharness/v1beta1/commands_test.go +++ b/pkg/apis/testharness/v1beta1/commands_test.go @@ -313,7 +313,7 @@ func TestValidateCommandOutput(t *testing.T) { b.WriteString("Hello, World!") return b }(), - wantErr: false, + wantErr: true, }, }