diff --git a/pkg/cache/v3/linear_test.go b/pkg/cache/v3/linear_test.go index 4327faf14..5d199c2ab 100644 --- a/pkg/cache/v3/linear_test.go +++ b/pkg/cache/v3/linear_test.go @@ -45,7 +45,7 @@ func verifyResponse(t *testing.T, ch <-chan Response, version string, num int) { assert.NotNilf(t, r.GetContext(), "unexpected empty response context") out, err := r.GetDiscoveryResponse() require.NoError(t, err) - assert.NotEqualf(t, "", out.GetVersionInfo(), "unexpected response empty version") + assert.NotEmptyf(t, out.GetVersionInfo(), "unexpected response empty version") n := len(out.GetResources()) assert.Equalf(t, n, num, "unexpected number of responses: got %d, want %d", n, num) if version != "" { @@ -65,7 +65,7 @@ func validateDeltaResponse(t *testing.T, resp DeltaResponse, resources []resourc assert.Equalf(t, testType, resp.GetDeltaRequest().GetTypeUrl(), "unexpected empty request type URL: %q", resp.GetDeltaRequest().GetTypeUrl()) out, err := resp.GetDeltaDiscoveryResponse() require.NoError(t, err) - assert.Equalf(t, len(out.GetResources()), len(resources), "unexpected number of responses: got %d, want %d", len(out.GetResources()), len(resources)) + assert.Lenf(t, out.GetResources(), len(resources), "unexpected number of responses: got %d, want %d", len(out.GetResources()), len(resources)) for _, r := range resources { found := false for _, r1 := range out.GetResources() {