Skip to content

Commit 6cd998f

Browse files
committed
chore(cookie-affinity): Fix linter issue
1 parent a68f2a6 commit 6cd998f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internal/ingress/annotations/sessionaffinity/main_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package sessionaffinity
1818

1919
import (
20+
"strconv"
2021
"testing"
2122

2223
api "k8s.io/api/core/v1"
@@ -70,6 +71,7 @@ func buildIngress() *networking.Ingress {
7071
}
7172

7273
func TestIngressAffinityCookieConfig(t *testing.T) {
74+
trueString := strconv.FormatBool(true)
7375
ing := buildIngress()
7476
data := map[string]string{}
7577
data[parser.GetAnnotationWithPrefix(annotationAffinityType)] = "cookie"
@@ -80,9 +82,9 @@ func TestIngressAffinityCookieConfig(t *testing.T) {
8082
data[parser.GetAnnotationWithPrefix(annotationAffinityCookiePath)] = "/foo"
8183
data[parser.GetAnnotationWithPrefix(annotationAffinityCookieDomain)] = "foo.bar"
8284
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
8688
ing.SetAnnotations(data)
8789

8890
affin, err := NewParser(&resolver.Mock{}).Parse(ing)

0 commit comments

Comments
 (0)