From cbfba29b3a640bb57539879066b71b36f526a3ce Mon Sep 17 00:00:00 2001 From: William Will <10997562+willwill96@users.noreply.github.com> Date: Fri, 8 Aug 2025 11:52:48 -0600 Subject: [PATCH] fix tests --- pkg/sessions/redis/redis_store_test.go | 6 ++-- test.yaml | 39 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 test.yaml diff --git a/pkg/sessions/redis/redis_store_test.go b/pkg/sessions/redis/redis_store_test.go index 26044317..a5471633 100644 --- a/pkg/sessions/redis/redis_store_test.go +++ b/pkg/sessions/redis/redis_store_test.go @@ -277,7 +277,7 @@ var _ = Describe("Redis SessionStore Tests", func() { Context("with AWS IAM options", func() { It("should initialize CredentialsProvider when AWSIAMConfig is present", func() { redisOpts := options.RedisStoreOptions{ - AWSIAMConfig: &options.AWSIAMOptions{ + AWSIAMConfig: &options.AWSIAMConfig{ ServiceName: "elasticache", ClusterName: "test-cluster", Username: "test-user", @@ -288,6 +288,8 @@ var _ = Describe("Redis SessionStore Tests", func() { opt = &redis.Options{} err := setupAWSIAMAuth(redisOpts, opt) + Expect(err).ToNot(HaveOccurred()) + Expect(opt.CredentialsProvider).ToNot(BeNil()) username, _ := opt.CredentialsProvider() @@ -302,7 +304,7 @@ var _ = Describe("Redis SessionStore Tests", func() { opt = &redis.Options{} err := setupAWSIAMAuth(redisOpts, opt) - + Expect(err).ToNot(HaveOccurred()) Expect(opt.CredentialsProvider).To(BeNil()) }) }) diff --git a/test.yaml b/test.yaml new file mode 100644 index 00000000..01bfc31f --- /dev/null +++ b/test.yaml @@ -0,0 +1,39 @@ +injectResponseHeaders: + - name: X-Auth-Request-User + values: + - claim: access_token +metricsServer: + BindAddress: ":5000" + SecureBindAddress: "" + TLS: null +providers: + - provider: keycloak-oidc + backendLogoutURL: /doesn't-matter + clientID: oauth2-proxy + clientSecret: oauth2-proxy + code_challenge_method: S256 + id: keycloak-oidc=oauth2-proxy + loginURLParameters: + - default: + - force + name: approval_prompt + oidcConfig: + audienceClaims: + - aud + emailClaim: email + extraAudiences: + - account + groupsClaim: groups + insecureSkipNonce: true + issuerURL: http://localhost:8080/realms/test + userIDClaim: email + +server: + BindAddress: ":4180" + SecureBindAddress: "" + TLS: null + +awsIam: + serviceName: elasticache + clusterName: test + userName: test