From 997a078c9861cd4221e046023d4ac7d2e9880343 Mon Sep 17 00:00:00 2001 From: KevFan Date: Mon, 2 Dec 2024 11:29:10 +0000 Subject: [PATCH] fix: integration tests after rebase Signed-off-by: KevFan --- tests/bare_k8s/kuadrant_controller_test.go | 28 +++++++++++++++++++- tests/gatewayapi/kuadrant_controller_test.go | 26 ++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/tests/bare_k8s/kuadrant_controller_test.go b/tests/bare_k8s/kuadrant_controller_test.go index e36d854ba..7d42b9c53 100644 --- a/tests/bare_k8s/kuadrant_controller_test.go +++ b/tests/bare_k8s/kuadrant_controller_test.go @@ -5,6 +5,7 @@ package bare_k8s_test import ( "time" + authorinoapi "github.com/kuadrant/authorino/api/v1beta3" kuadrantdnsv1alpha1 "github.com/kuadrant/dns-operator/api/v1alpha1" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -20,7 +21,7 @@ import ( "github.com/kuadrant/kuadrant-operator/tests" ) -var _ = Describe("Kuadrant controller is disabled", func() { +var _ = Describe("Kuadrant controller when Gateway API is missing", func() { var ( testNamespace string testTimeOut = SpecTimeout(15 * time.Second) @@ -117,6 +118,18 @@ var _ = Describe("Kuadrant controller is disabled", func() { Name: "test", }, }, + RateLimitPolicySpecProper: kuadrantv1.RateLimitPolicySpecProper{ + Limits: map[string]kuadrantv1.Limit{ + "test": { + Rates: []kuadrantv1.Rate{ + { + Limit: 10, + Window: "10s", + }, + }, + }, + }, + }, }, } @@ -150,6 +163,19 @@ var _ = Describe("Kuadrant controller is disabled", func() { Name: "test", }, }, + AuthPolicySpecProper: kuadrantv1.AuthPolicySpecProper{ + AuthScheme: &kuadrantv1.AuthSchemeSpec{ + Authentication: map[string]kuadrantv1.MergeableAuthenticationSpec{ + "anyonmous": { + AuthenticationSpec: authorinoapi.AuthenticationSpec{ + AuthenticationMethodSpec: authorinoapi.AuthenticationMethodSpec{ + AnonymousAccess: &authorinoapi.AnonymousAccessSpec{}, + }, + }, + }, + }, + }, + }, }, } diff --git a/tests/gatewayapi/kuadrant_controller_test.go b/tests/gatewayapi/kuadrant_controller_test.go index c30ca7fa1..38e8ce94d 100644 --- a/tests/gatewayapi/kuadrant_controller_test.go +++ b/tests/gatewayapi/kuadrant_controller_test.go @@ -5,6 +5,7 @@ package gatewayapi_test import ( "time" + authorinoapi "github.com/kuadrant/authorino/api/v1beta3" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/meta" @@ -74,6 +75,18 @@ var _ = Describe("Kuadrant controller when gateway provider is missing", func() Name: "test", }, }, + RateLimitPolicySpecProper: kuadrantv1.RateLimitPolicySpecProper{ + Limits: map[string]kuadrantv1.Limit{ + "test": { + Rates: []kuadrantv1.Rate{ + { + Limit: 10, + Window: "10s", + }, + }, + }, + }, + }, }, } @@ -107,6 +120,19 @@ var _ = Describe("Kuadrant controller when gateway provider is missing", func() Name: "test", }, }, + AuthPolicySpecProper: kuadrantv1.AuthPolicySpecProper{ + AuthScheme: &kuadrantv1.AuthSchemeSpec{ + Authentication: map[string]kuadrantv1.MergeableAuthenticationSpec{ + "anyonmous": { + AuthenticationSpec: authorinoapi.AuthenticationSpec{ + AuthenticationMethodSpec: authorinoapi.AuthenticationMethodSpec{ + AnonymousAccess: &authorinoapi.AnonymousAccessSpec{}, + }, + }, + }, + }, + }, + }, }, }