Change enable-snippet to allow-snippet-annotation (#7670)
Signed-off-by: Ricardo Pchevuzinske Katz <rkatz@vmware.com>
This commit is contained in:
parent
8e7727eb65
commit
4fc57dcc49
12 changed files with 30 additions and 28 deletions
|
|
@ -316,7 +316,7 @@ var _ = framework.DescribeAnnotation("modsecurity owasp", func() {
|
|||
f.SetNginxConfigMapData(map[string]string{
|
||||
"enable-modsecurity": "true",
|
||||
"enable-owasp-modsecurity-crs": "true",
|
||||
"enable-snippet-directives": "false",
|
||||
"allow-snippet-annotations": "false",
|
||||
"modsecurity-snippet": expectedComment,
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ var _ = framework.DescribeAnnotation("server-snippet", func() {
|
|||
}
|
||||
|
||||
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
|
||||
f.UpdateNginxConfigMapData("enable-snippet-directives", "false")
|
||||
f.UpdateNginxConfigMapData("allow-snippet-annotations", "false")
|
||||
defer func() {
|
||||
// Return to the original value
|
||||
f.UpdateNginxConfigMapData("enable-snippet-directives", "true")
|
||||
f.UpdateNginxConfigMapData("allow-snippet-annotations", "true")
|
||||
}()
|
||||
// Sleep a while just to guarantee that the configmap is applied
|
||||
framework.Sleep()
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@ var _ = framework.DescribeAnnotation("configuration-snippet", func() {
|
|||
}
|
||||
|
||||
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
|
||||
f.UpdateNginxConfigMapData("enable-snippet-directives", "false")
|
||||
f.UpdateNginxConfigMapData("allow-snippet-annotations", "false")
|
||||
defer func() {
|
||||
// Return to the original value
|
||||
f.UpdateNginxConfigMapData("enable-snippet-directives", "true")
|
||||
f.UpdateNginxConfigMapData("allow-snippet-annotations", "true")
|
||||
}()
|
||||
// Sleep a while just to guarantee that the configmap is applied
|
||||
framework.Sleep()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue