Skip to content

Commit 5042fe6

Browse files
committed
Add another generator test case
1 parent 96cec7e commit 5042fe6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func TestGenerate(t *testing.T) {
132132
graph.PlusReportClientSSLCertificate: []byte("cert"),
133133
graph.PlusReportClientSSLKey: []byte("key"),
134134
},
135-
NginxPlus: dataplane.NginxPlus{AllowedAddresses: []string{"127.0.0.3", "25.0.0.3"}},
135+
NginxPlus: dataplane.NginxPlus{AllowedAddresses: []string{"127.0.0.3", "25.0.0.3", "24.0.0.3/32"}},
136136
}
137137
g := NewWithT(t)
138138

@@ -211,6 +211,7 @@ func TestGenerate(t *testing.T) {
211211
g.Expect(httpCfg).To(ContainSubstring("root /usr/share/nginx/html;"))
212212
g.Expect(httpCfg).To(ContainSubstring("allow 127.0.0.3;"))
213213
g.Expect(httpCfg).To(ContainSubstring("allow 25.0.0.3;"))
214+
g.Expect(httpCfg).To(ContainSubstring("allow 24.0.0.3/32;"))
214215
g.Expect(httpCfg).To(ContainSubstring("deny all;"))
215216
g.Expect(httpCfg).To(ContainSubstring("location = /dashboard.html {}"))
216217

0 commit comments

Comments
 (0)