From c74790e266a84890a81a325c08a95ba515f6e6d3 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Fri, 19 May 2023 10:08:23 +0530 Subject: [PATCH] remove redundunt type conversion, unused variable...etc `Framework` variable has been removed from test/* unwanted `[]byte` conversion has been removed import alias has been avoided Signed-off-by: Humble Chirammal --- test/images/agnhost/connect/connect.go | 2 +- test/images/agnhost/openidmetadata/openidmetadata.go | 2 +- test/images/agnhost/webhook/addlabel_test.go | 2 +- test/images/resource-consumer/common/common.go | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/images/agnhost/connect/connect.go b/test/images/agnhost/connect/connect.go index 72c44995401..3423549e2d0 100644 --- a/test/images/agnhost/connect/connect.go +++ b/test/images/agnhost/connect/connect.go @@ -111,7 +111,7 @@ func connectSCTP(dest string, timeout time.Duration) { } timeoutCh := time.After(timeout) - errCh := make(chan (error)) + errCh := make(chan error) go func() { conn, err := sctp.DialSCTP("sctp", nil, addr) diff --git a/test/images/agnhost/openidmetadata/openidmetadata.go b/test/images/agnhost/openidmetadata/openidmetadata.go index 29c76af0a29..fad748d50a8 100644 --- a/test/images/agnhost/openidmetadata/openidmetadata.go +++ b/test/images/agnhost/openidmetadata/openidmetadata.go @@ -29,7 +29,7 @@ import ( "runtime" "time" - oidc "github.com/coreos/go-oidc" + "github.com/coreos/go-oidc" "github.com/spf13/cobra" "golang.org/x/oauth2" "gopkg.in/square/go-jose.v2/jwt" diff --git a/test/images/agnhost/webhook/addlabel_test.go b/test/images/agnhost/webhook/addlabel_test.go index b603dad84e7..3c2fc43ff25 100644 --- a/test/images/agnhost/webhook/addlabel_test.go +++ b/test/images/agnhost/webhook/addlabel_test.go @@ -61,7 +61,7 @@ func TestAddLabel(t *testing.T) { review := v1.AdmissionReview{Request: &v1.AdmissionRequest{Object: runtime.RawExtension{Raw: raw}}} response := addLabel(review) if response.Patch != nil { - patchObj, err := jsonpatch.DecodePatch([]byte(response.Patch)) + patchObj, err := jsonpatch.DecodePatch(response.Patch) if err != nil { t.Fatal(err) } diff --git a/test/images/resource-consumer/common/common.go b/test/images/resource-consumer/common/common.go index 58ce2ed79ab..b1a771b1cc0 100644 --- a/test/images/resource-consumer/common/common.go +++ b/test/images/resource-consumer/common/common.go @@ -37,6 +37,4 @@ const ( UnknownFunction = "unknown function" IncorrectFunctionArgument = "incorrect function argument" NotGivenFunctionArgument = "not given function argument" - - FrameworkName = "horizontal-pod-autoscaling" )