Skip to content

Commit 53a0a79

Browse files
committed
fix test
1 parent 6d20796 commit 53a0a79

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

operator/internal/manifests/gateway_test.go

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,14 +751,47 @@ func TestBuildGateway_WithRulesEnabled(t *testing.T) {
751751
Enabled: true,
752752
},
753753
Tenants: &lokiv1.TenantsSpec{
754-
Mode: lokiv1.OpenshiftLogging,
754+
Mode: lokiv1.OpenshiftNetwork,
755+
},
756+
},
757+
Timeouts: defaultTimeoutConfig,
758+
},
759+
wantArgs: []string{
760+
"--logs.rules.endpoint=https://abcd-ruler-http.efgh.svc.cluster.local:3100",
761+
"--logs.rules.read-only=true",
762+
},
763+
},
764+
{
765+
desc: "openshift mode",
766+
opts: Options{
767+
Name: "abcd",
768+
Namespace: "efgh",
769+
Gates: configv1.FeatureGates{
770+
LokiStackGateway: true,
771+
HTTPEncryption: true,
772+
OpenShift: configv1.OpenShiftFeatureGates{
773+
ServingCertsService: true,
774+
},
775+
},
776+
Stack: lokiv1.LokiStackSpec{
777+
Template: &lokiv1.LokiTemplateSpec{
778+
Gateway: &lokiv1.LokiComponentSpec{
779+
Replicas: rand.Int31(),
780+
},
781+
},
782+
Rules: &lokiv1.RulesSpec{
783+
Enabled: true,
784+
},
785+
Tenants: &lokiv1.TenantsSpec{
786+
Mode: lokiv1.Openshift,
755787
},
756788
},
757789
Timeouts: defaultTimeoutConfig,
758790
},
759791
wantArgs: []string{
760792
"--logs.rules.endpoint=https://abcd-ruler-http.efgh.svc.cluster.local:3100",
761793
"--logs.rules.read-only=true",
794+
"--logs.rules.label-filters=application:kubernetes_namespace_name,k8s_namespace_name",
762795
},
763796
},
764797
}

0 commit comments

Comments
 (0)