Trim spaces from badword items (#7921)

This commit is contained in:
Ricardo Katz 2021-11-15 20:37:29 -03:00 committed by GitHub
parent 7d17ff35fa
commit 15567b07c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 1 deletions

View file

@ -284,6 +284,10 @@ func TestCheckIngress(t *testing.T) {
if err := nginx.CheckIngress(ing); err == nil {
t.Errorf("with an invalid value in annotation the ingress should be rejected")
}
ing.ObjectMeta.Annotations["nginx.ingress.kubernetes.io/custom-headers"] = "another_directive"
if err := nginx.CheckIngress(ing); err == nil {
t.Errorf("with an invalid value in annotation the ingress should be rejected")
}
})
t.Run("When a new catch-all ingress is being created despite catch-alls being disabled ", func(t *testing.T) {