Skip to content

Commit

Permalink
Merge pull request #3176 from cupakob/fix-bad-smells
Browse files Browse the repository at this point in the history
🌱 Fix bad smells
  • Loading branch information
kcp-ci-bot authored Oct 4, 2024
2 parents de49219 + 866c338 commit cb5a43f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/virtual/framework/forwardingregistry/rest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func TestGet(t *testing.T) {

result, err := getter.Get(ctx, "foo", &metav1.GetOptions{})
require.NoError(t, err)
require.Truef(t, apiequality.Semantic.DeepEqual(resource, result), "expected:\n%V\nactual:\n%V", resource, result)
require.Truef(t, apiequality.Semantic.DeepEqual(resource, result), "expected:\n%v\nactual:\n%v", resource, result)
}

func TestList(t *testing.T) {
Expand All @@ -178,7 +178,7 @@ func TestList(t *testing.T) {
require.Len(t, resultResources, len(resources))
for i, resource := range resources {
resource := *resource.(*unstructured.Unstructured)
require.Truef(t, apiequality.Semantic.DeepEqual(resource, resultResources[i]), "expected:\n%V\nactual:\n%V", resource, resultResources[0])
require.Truef(t, apiequality.Semantic.DeepEqual(resource, resultResources[i]), "expected:\n%v\nactual:\n%v", resource, resultResources[0])
}
require.Len(t, fakeClient.Actions(), 1)
require.Equal(t, "noxus", fakeClient.Actions()[0].GetResource().Resource)
Expand Down Expand Up @@ -209,7 +209,7 @@ func TestWildcardListWithAPIExportIdentity(t *testing.T) {
require.Len(t, resultResources, len(resources))
for i, resource := range resources {
resource := *resource.(*unstructured.Unstructured)
require.Truef(t, apiequality.Semantic.DeepEqual(resource, resultResources[i]), "expected:\n%V\nactual:\n%V", resource, resultResources[0])
require.Truef(t, apiequality.Semantic.DeepEqual(resource, resultResources[i]), "expected:\n%v\nactual:\n%v", resource, resultResources[0])
}
require.Len(t, fakeClient.Actions(), 1)
require.Equal(t, "noxus:apiExportIdentityHash", fakeClient.Actions()[0].GetResource().Resource)
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/fixtures/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package webhook
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
Expand Down Expand Up @@ -59,7 +60,7 @@ func (s *AdmissionWebhookServer) StartTLS(t *testing.T, certFile, keyFile string

go func() {
err := serv.ListenAndServeTLS(certFile, keyFile)
if err != nil && err != http.ErrServerClosed {
if err != nil && !errors.Is(err, http.ErrServerClosed) {
t.Logf("unable to shutdown server gracefully err: %v", err)
}
}()
Expand Down

0 comments on commit cb5a43f

Please sign in to comment.