Skip to content

Commit 874590e

Browse files
test(keycloak): pin organizationsEnabled rendering in configure-kk
Cover both paths of the new value: the chart default renders spec.organizationsEnabled: false (no behaviour change), and setting organizationsEnabled: true renders through to the ClusterKeycloakRealm. Assisted-by: LLM Signed-off-by: Mattia Eleuteri <[email protected]>
1 parent adb2918 commit 874590e

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
suite: keycloak realm organizations toggle
2+
3+
# organizationsEnabled must reach ClusterKeycloakRealm.spec.organizationsEnabled:
4+
# the keycloak-operator PUTs the rendered spec back on every reconcile, so a
5+
# toggle flipped in the admin console is reverted unless it is a chart value.
6+
# The default must render false — no behaviour change on stock installs.
7+
release:
8+
name: keycloak-configure
9+
namespace: cozy-keycloak
10+
tests:
11+
- it: default renders organizationsEnabled false
12+
template: templates/configure-kk.yaml
13+
documentSelector:
14+
path: kind
15+
value: ClusterKeycloakRealm
16+
set:
17+
_cluster:
18+
root-host: example.com
19+
kube-root-ca: ""
20+
asserts:
21+
- equal:
22+
path: spec.organizationsEnabled
23+
value: false
24+
25+
- it: organizationsEnabled true renders through to the realm spec
26+
template: templates/configure-kk.yaml
27+
documentSelector:
28+
path: kind
29+
value: ClusterKeycloakRealm
30+
set:
31+
_cluster:
32+
root-host: example.com
33+
kube-root-ca: ""
34+
organizationsEnabled: true
35+
asserts:
36+
- equal:
37+
path: spec.organizationsEnabled
38+
value: true

0 commit comments

Comments
 (0)