Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 authored Dec 2, 2024
1 parent c527e51 commit 3fca00f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cache/v3/linear_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand All @@ -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() {
Expand Down

0 comments on commit 3fca00f

Please sign in to comment.