File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
internal/ingress/annotations/sessionaffinity Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ limitations under the License.
17
17
package sessionaffinity
18
18
19
19
import (
20
+ "strconv"
20
21
"testing"
21
22
22
23
api "k8s.io/api/core/v1"
@@ -70,6 +71,7 @@ func buildIngress() *networking.Ingress {
70
71
}
71
72
72
73
func TestIngressAffinityCookieConfig (t * testing.T ) {
74
+ trueString := strconv .FormatBool (true )
73
75
ing := buildIngress ()
74
76
data := map [string ]string {}
75
77
data [parser .GetAnnotationWithPrefix (annotationAffinityType )] = "cookie"
@@ -80,9 +82,9 @@ func TestIngressAffinityCookieConfig(t *testing.T) {
80
82
data [parser .GetAnnotationWithPrefix (annotationAffinityCookiePath )] = "/foo"
81
83
data [parser .GetAnnotationWithPrefix (annotationAffinityCookieDomain )] = "foo.bar"
82
84
data [parser .GetAnnotationWithPrefix (annotationAffinityCookieSameSite )] = "Strict"
83
- data [parser .GetAnnotationWithPrefix (annotationAffinityCookieChangeOnFailure )] = "true"
84
- data [parser .GetAnnotationWithPrefix (annotationAffinityCookieSecure )] = "true"
85
- data [parser .GetAnnotationWithPrefix (annotationAffinityCookiePartitioned )] = "true"
85
+ data [parser .GetAnnotationWithPrefix (annotationAffinityCookieChangeOnFailure )] = trueString
86
+ data [parser .GetAnnotationWithPrefix (annotationAffinityCookieSecure )] = trueString
87
+ data [parser .GetAnnotationWithPrefix (annotationAffinityCookiePartitioned )] = trueString
86
88
ing .SetAnnotations (data )
87
89
88
90
affin , err := NewParser (& resolver.Mock {}).Parse (ing )
You can’t perform that action at this time.
0 commit comments