|
8 | 8 |
|
9 | 9 | . "github.com/onsi/gomega" |
10 | 10 |
|
| 11 | + "github.com/nginx/nginx-gateway-fabric/v2/internal/controller/nginx/config/policies/policiesfakes" |
11 | 12 | "github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/dataplane" |
12 | 13 | ) |
13 | 14 |
|
@@ -69,7 +70,7 @@ func TestLoggingSettingsTemplate(t *testing.T) { |
69 | 70 | Logging: dataplane.Logging{AccessLog: tt.accessLog}, |
70 | 71 | } |
71 | 72 |
|
72 | | - res := executeBaseHTTPConfig(conf) |
| 73 | + res := executeBaseHTTPConfig(conf, &policiesfakes.FakeGenerator{}) |
73 | 74 | g.Expect(res).To(HaveLen(1)) |
74 | 75 | httpConfig := string(res[0].data) |
75 | 76 | for _, expectedOutput := range tt.expectedOutputs { |
@@ -120,7 +121,7 @@ func TestExecuteBaseHttp_HTTP2(t *testing.T) { |
120 | 121 | t.Parallel() |
121 | 122 | g := NewWithT(t) |
122 | 123 |
|
123 | | - res := executeBaseHTTPConfig(test.conf) |
| 124 | + res := executeBaseHTTPConfig(test.conf, &policiesfakes.FakeGenerator{}) |
124 | 125 | g.Expect(res).To(HaveLen(1)) |
125 | 126 | g.Expect(test.expCount).To(Equal(strings.Count(string(res[0].data), expSubStr))) |
126 | 127 | g.Expect(strings.Count(string(res[0].data), "map $http_host $gw_api_compliant_host {")).To(Equal(1)) |
@@ -150,7 +151,7 @@ func TestExecuteBaseHttp_Snippets(t *testing.T) { |
150 | 151 |
|
151 | 152 | g := NewWithT(t) |
152 | 153 |
|
153 | | - res := executeBaseHTTPConfig(conf) |
| 154 | + res := executeBaseHTTPConfig(conf, &policiesfakes.FakeGenerator{}) |
154 | 155 | g.Expect(res).To(HaveLen(3)) |
155 | 156 |
|
156 | 157 | sort.Slice( |
@@ -261,7 +262,7 @@ func TestExecuteBaseHttp_NginxReadinessProbePort(t *testing.T) { |
261 | 262 | t.Parallel() |
262 | 263 | g := NewWithT(t) |
263 | 264 |
|
264 | | - res := executeBaseHTTPConfig(test.conf) |
| 265 | + res := executeBaseHTTPConfig(test.conf, &policiesfakes.FakeGenerator{}) |
265 | 266 | g.Expect(res).To(HaveLen(1)) |
266 | 267 |
|
267 | 268 | httpConfig := string(res[0].data) |
@@ -377,7 +378,7 @@ func TestExecuteBaseHttp_DNSResolver(t *testing.T) { |
377 | 378 | t.Parallel() |
378 | 379 | g := NewWithT(t) |
379 | 380 |
|
380 | | - res := executeBaseHTTPConfig(test.conf) |
| 381 | + res := executeBaseHTTPConfig(test.conf, &policiesfakes.FakeGenerator{}) |
381 | 382 | g.Expect(res).To(HaveLen(1)) |
382 | 383 |
|
383 | 384 | httpConfig := string(res[0].data) |
@@ -435,7 +436,7 @@ func TestExecuteBaseHttp_GatewaySecretID(t *testing.T) { |
435 | 436 | t.Parallel() |
436 | 437 | g := NewWithT(t) |
437 | 438 |
|
438 | | - res := executeBaseHTTPConfig(test.conf) |
| 439 | + res := executeBaseHTTPConfig(test.conf, &policiesfakes.FakeGenerator{}) |
439 | 440 | g.Expect(res).To(HaveLen(1)) |
440 | 441 |
|
441 | 442 | httpConfig := string(res[0].data) |
|
0 commit comments