remove endpoints length check in TestValidateSecureEndpoints()

dependabot/go_modules/go.uber.org/atomic-1.10.0
eval-exec 2022-03-21 23:08:35 +08:00
parent ad78a74c42
commit 8d01ac2816
1 changed files with 3 additions and 8 deletions

View File

@ -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)
}
})
}