@@ -17,7 +17,6 @@ package v1
1717
1818import (
1919 "context"
20- "strings"
2120 "testing"
2221
2322 "github.com/stretchr/testify/assert"
@@ -64,29 +63,6 @@ func buildIngressValidator(t *testing.T, objects ...runtime.Object) *IngressCust
6463 return NewIngressCustomValidator (builder .Build ())
6564}
6665
67- func TestIngressCustomValidator_ValidateCreate_UnsupportedAnnotations (t * testing.T ) {
68- validator := buildIngressValidator (t )
69- obj := & networkingv1.Ingress {
70- ObjectMeta : metav1.ObjectMeta {
71- Name : "test-ingress" ,
72- Namespace : "default" ,
73- Annotations : map [string ]string {
74- "k8s.apisix.apache.org/use-regex" : "true" ,
75- "k8s.apisix.apache.org/enable-websocket" : "true" ,
76- },
77- },
78- }
79-
80- warnings , err := validator .ValidateCreate (context .TODO (), obj )
81- assert .NoError (t , err )
82- assert .Len (t , warnings , 2 )
83-
84- // Check that warnings contain the expected unsupported annotations
85- warningsStr := strings .Join (warnings , " " )
86- assert .Contains (t , warningsStr , "k8s.apisix.apache.org/use-regex" )
87- assert .Contains (t , warningsStr , "k8s.apisix.apache.org/enable-websocket" )
88- }
89-
9066func TestIngressCustomValidator_ValidateCreate_SupportedAnnotations (t * testing.T ) {
9167 validator := buildIngressValidator (t )
9268 obj := & networkingv1.Ingress {
0 commit comments