Skip to content

Commit

Permalink
remove endpoints length check in TestValidateSecureEndpoints()
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Mar 23, 2022
1 parent ad78a74 commit 8d01ac2
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions client/pkg/transport/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,11 @@ func TestValidateSecureEndpoints(t *testing.T) {
t.Run(name, func(t *testing.T) {
secureEps, err := ValidateSecureEndpoints(*tlsInfo, test.endPoints)
if test.expectedErr != (err != nil) {
t.Errorf("Unexpected error, got: %v, want: %v", err, test.expectedError)
t.Errorf("Unexpected error, got: %v, want: %v", err, test.expectedErr)
}

if err == nil && !test.expectedErr {
if len(secureEps) != len(test.expectedEndpoints) {
t.Errorf("expected %v endpoints, got %v", len(test.expectedEndpoints), len(secureEps))
}
if !reflect.DeepEqual(test.expectedEndpoints, secureEps) {
t.Errorf("expected endpoints %v, got %v", test.expectedEndpoints, secureEps)
}
if !reflect.DeepEqual(test.expectedEndpoints, secureEps) {
t.Errorf("expected endpoints %v, got %v", test.expectedEndpoints, secureEps)
}
})
}
Expand Down

0 comments on commit 8d01ac2

Please sign in to comment.