Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: huabing zhao <[email protected]>
  • Loading branch information
zhaohuabing committed Oct 26, 2023
1 parent 462e1e8 commit d05611d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
4 changes: 0 additions & 4 deletions api/v1alpha1/validation/securitypolicy_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ func validateSecurityPolicySpec(spec *egv1a1.SecurityPolicySpec) error {
func ValidateJWTProvider(providers []egv1a1.JWTProvider) error {
var errs []error

if len(providers) == 0 {
errs = append(errs, errors.New("no jwt providers are specified"))
}

var names []string
for _, provider := range providers {
switch {
Expand Down
19 changes: 0 additions & 19 deletions api/v1alpha1/validation/securitypolicy_validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,6 @@ func TestValidateSecurityPolicy(t *testing.T) {
},
expected: false,
},
{
name: "empty provider list",
policy: &egv1a1.SecurityPolicy{
TypeMeta: metav1.TypeMeta{
Kind: egv1a1.KindSecurityPolicy,
APIVersion: egv1a1.GroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "test",
Name: "test",
},
Spec: egv1a1.SecurityPolicySpec{
JWT: &egv1a1.JWT{
Providers: []egv1a1.JWTProvider{},
},
},
},
expected: false,
},
{
name: "valid security policy with url",
policy: &egv1a1.SecurityPolicy{
Expand Down

0 comments on commit d05611d

Please sign in to comment.