Skip to content

Commit 6b4d04e

Browse files
committed
fix tests
1 parent 7090cd6 commit 6b4d04e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

internal/mode/static/nginx/conf/nginx.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ http {
3838
}
3939

4040
stream {
41-
include /etc/nginx/stream-conf.d/*.conf;
42-
4341
variables_hash_bucket_size 512;
4442
variables_hash_max_size 1024;
4543

46-
# map_hash_max_size 2048;
47-
# map_hash_bucket_size 256;
44+
map_hash_max_size 2048;
45+
map_hash_bucket_size 256;
46+
47+
include /etc/nginx/stream-conf.d/*.conf;
4848
}

internal/mode/static/nginx/config/maps_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,17 @@ func TestCreateStreamMaps(t *testing.T) {
264264
Parameters: []shared.MapParameter{
265265
{Value: "example.com", Result: "unix:/var/run/nginx/example.com8081.sock"},
266266
},
267+
UseHostnames: true,
267268
},
268269
{
269270
Source: "$ssl_preread_server_name",
270271
Variable: getVariableName(8080),
271272
Parameters: []shared.MapParameter{
272273
{Value: "example.com", Result: "unix:/var/run/nginx/example.com8080.sock"},
273274
{Value: "cafe.example.com", Result: "unix:/var/run/nginx/cafe.example.com8080.sock"},
274-
{Value: "app.example.com", Result: "unix:/var/run/nginx/app.example.com8080.sock"},
275+
{Value: "app.example.com", Result: "unix:/var/run/nginx/https8080.sock"},
275276
},
277+
UseHostnames: true,
276278
},
277279
}
278280
g.Expect(maps).To(Equal(expectedMaps))

0 commit comments

Comments
 (0)