File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,14 @@ var _ = framework.DescribeAnnotation("canary-*", func() {
8888
8989 ginkgo .It ("should return 404 status for requests to the canary if no matching ingress is found" , func () {
9090 host := fooHost
91+ filterHeader := "CanaryByHeaderFoo"
92+ wrongHeaders := []string {
93+ "WrongHeader" ,
94+ "CanaryByHeader" ,
95+ "CanaryByHeaderBar" ,
96+ "CanaryByHeaderFooBar" ,
97+ "BarCanaryByHeaderFoo" ,
98+ }
9199
92100 canaryAnnotations := map [string ]string {
93101 "nginx.ingress.kubernetes.io/canary" : "true" ,
@@ -110,12 +118,14 @@ var _ = framework.DescribeAnnotation("canary-*", func() {
110118 return strings .Contains (server , fmt .Sprintf ("server_name %v" , host ))
111119 })
112120
113- f .HTTPTestClient ().
114- GET ("/info" ).
115- WithHeader ("Host" , host ).
116- WithHeader ("CanaryByHeader" , "always" ).
117- Expect ().
118- Status (http .StatusNotFound )
121+ for _ , wh := range wrongHeaders {
122+ f .HTTPTestClient ().
123+ GET ("/info" ).
124+ WithHeader ("Host" , host ).
125+ WithHeader (wh , "always" ).
126+ Expect ().
127+ Status (http .StatusNotFound )
128+ }
119129 })
120130
121131 /*
You can’t perform that action at this time.
0 commit comments