Skip to content

Commit bd00631

Browse files
committed
fix lint errors and update directives
1 parent 503439e commit bd00631

File tree

4 files changed

+28
-12
lines changed

4 files changed

+28
-12
lines changed

tests/suite/manifests/snippets-filter/gateway.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ spec:
99
port: 80
1010
protocol: HTTP
1111
hostname: "*.example.com"
12-

tests/suite/manifests/snippets-filter/grpc-backend.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ spec:
3737
resources:
3838
requests:
3939
cpu: 10m
40-

tests/suite/manifests/snippets-filter/invalid-context-sf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ spec:
3434
name: invalid-context
3535
backendRefs:
3636
- name: soda
37-
port: 80
37+
port: 80

tests/suite/snippets_filter_test.go

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ var _ = Describe("SnippetsFilter", Ordered, Label("functional", "snippets-filter
2525
"snippets-filter/cafe.yaml",
2626
"snippets-filter/gateway.yaml",
2727
"snippets-filter/grpc-backend.yaml",
28-
"snippets-filter/cafe-routes.yaml",
29-
"snippets-filter/grpc-route.yaml",
3028
}
3129

3230
namespace = "snippets-filter"
@@ -128,11 +126,21 @@ var _ = Describe("SnippetsFilter", Ordered, Label("functional", "snippets-filter
128126
Value: "0",
129127
File: fmt.Sprintf("%s%s", mainContext, httpRouteSuffix),
130128
},
129+
{
130+
Directive: "include",
131+
Value: fmt.Sprintf("%s%s", mainContext, httpRouteSuffix),
132+
File: "main.conf",
133+
},
131134
{
132135
Directive: "aio",
133136
Value: "on",
134137
File: fmt.Sprintf("%s%s", httpContext, httpRouteSuffix),
135138
},
139+
{
140+
Directive: "include",
141+
Value: fmt.Sprintf("%s%s", httpContext, httpRouteSuffix),
142+
File: "http.conf",
143+
},
136144
{
137145
Directive: "auth_delay",
138146
Value: "10s",
@@ -163,27 +171,37 @@ var _ = Describe("SnippetsFilter", Ordered, Label("functional", "snippets-filter
163171
Value: "120s",
164172
File: fmt.Sprintf("%s%s", mainContext, grpcRouteSuffix),
165173
},
174+
{
175+
Directive: "include",
176+
Value: fmt.Sprintf("%s%s", mainContext, grpcRouteSuffix),
177+
File: "main.conf",
178+
},
166179
{
167180
Directive: "types_hash_bucket_size",
168181
Value: "64",
169182
File: fmt.Sprintf("%s%s", httpContext, grpcRouteSuffix),
170183
},
171184
{
172-
Directive: "server_tokens",
173-
Value: "on",
174-
File: fmt.Sprintf("%s%s", httpServerContext, grpcRouteSuffix),
185+
Directive: "include",
186+
Value: fmt.Sprintf("%s%s", httpContext, grpcRouteSuffix),
187+
File: "http.conf",
175188
},
176189
{
177-
Directive: "tcp_nodelay",
190+
Directive: "server_tokens",
178191
Value: "on",
179-
File: fmt.Sprintf("%s%s", httpServerLocationContext, grpcRouteSuffix),
192+
File: fmt.Sprintf("%s%s", httpServerContext, grpcRouteSuffix),
180193
},
181194
{
182195
Directive: "include",
183196
Value: fmt.Sprintf("%s%s", httpServerContext, grpcRouteSuffix),
184197
Servers: []string{"*.example.com"},
185198
File: "http.conf",
186199
},
200+
{
201+
Directive: "tcp_nodelay",
202+
Value: "on",
203+
File: fmt.Sprintf("%s%s", httpServerLocationContext, grpcRouteSuffix),
204+
},
187205
{
188206
Directive: "include",
189207
Value: fmt.Sprintf("%s%s", httpServerLocationContext, grpcRouteSuffix),
@@ -222,7 +240,7 @@ var _ = Describe("SnippetsFilter", Ordered, Label("functional", "snippets-filter
222240
})
223241

224242
func waitForHTTPRouteToHaveGatewayNotProgrammedCond(httpRouteNsName types.NamespacedName) error {
225-
ctx, cancel := context.WithTimeout(context.Background(), timeoutConfig.GetStatusTimeout)
243+
ctx, cancel := context.WithTimeout(context.Background(), timeoutConfig.GetStatusTimeout*2)
226244
defer cancel()
227245

228246
GinkgoWriter.Printf(
@@ -232,7 +250,7 @@ func waitForHTTPRouteToHaveGatewayNotProgrammedCond(httpRouteNsName types.Namesp
232250

233251
return wait.PollUntilContextCancel(
234252
ctx,
235-
time.Second*3,
253+
time.Second*1,
236254
true, /* poll immediately */
237255
func(ctx context.Context) (bool, error) {
238256
var hr v1.HTTPRoute

0 commit comments

Comments
 (0)