chore(cookie-affinity): Fix linter issue
This commit is contained in:
parent
a68f2a67bb
commit
6cd998f031
1 changed files with 5 additions and 3 deletions
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
package sessionaffinity
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
api "k8s.io/api/core/v1"
|
||||
|
@ -70,6 +71,7 @@ func buildIngress() *networking.Ingress {
|
|||
}
|
||||
|
||||
func TestIngressAffinityCookieConfig(t *testing.T) {
|
||||
trueString := strconv.FormatBool(true)
|
||||
ing := buildIngress()
|
||||
data := map[string]string{}
|
||||
data[parser.GetAnnotationWithPrefix(annotationAffinityType)] = "cookie"
|
||||
|
@ -80,9 +82,9 @@ func TestIngressAffinityCookieConfig(t *testing.T) {
|
|||
data[parser.GetAnnotationWithPrefix(annotationAffinityCookiePath)] = "/foo"
|
||||
data[parser.GetAnnotationWithPrefix(annotationAffinityCookieDomain)] = "foo.bar"
|
||||
data[parser.GetAnnotationWithPrefix(annotationAffinityCookieSameSite)] = "Strict"
|
||||
data[parser.GetAnnotationWithPrefix(annotationAffinityCookieChangeOnFailure)] = "true"
|
||||
data[parser.GetAnnotationWithPrefix(annotationAffinityCookieSecure)] = "true"
|
||||
data[parser.GetAnnotationWithPrefix(annotationAffinityCookiePartitioned)] = "true"
|
||||
data[parser.GetAnnotationWithPrefix(annotationAffinityCookieChangeOnFailure)] = trueString
|
||||
data[parser.GetAnnotationWithPrefix(annotationAffinityCookieSecure)] = trueString
|
||||
data[parser.GetAnnotationWithPrefix(annotationAffinityCookiePartitioned)] = trueString
|
||||
ing.SetAnnotations(data)
|
||||
|
||||
affin, err := NewParser(&resolver.Mock{}).Parse(ing)
|
||||
|
|
Loading…
Reference in a new issue