Skip to content

Commit cd3c31e

Browse files
committed
fix(kuttl): revert change from #580
1 parent 1477028 commit cd3c31e

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

tests/templates/kuttl/aas-user-info/10-install-opa.yaml.j2

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ commands:
55
- script: |
66
kubectl apply -n $NAMESPACE -f - <<EOF
77
---
8+
apiVersion: v1
9+
kind: ConfigMap
10+
metadata:
11+
name: test
12+
labels:
13+
opa.stackable.tech/bundle: "true"
14+
data:
15+
test.rego: |
16+
package test
17+
18+
userInfoByUsername(username) := http.send({"method": "POST", "url": "http://127.0.0.1:9476/user", "body": {"username": username}, "headers": {"Content-Type": "application/json"}, "raise_error": true}).body
19+
userInfoById(id) := http.send({"method": "POST", "url": "http://127.0.0.1:9476/user", "body": {"id": id}, "headers": {"Content-Type": "application/json"}, "raise_error": true}).body
20+
21+
currentUserInfoByUsername := userInfoByUsername(input.username)
22+
currentUserInfoById := userInfoById(input.id)
23+
---
824
apiVersion: opa.stackable.tech/v1alpha1
925
kind: OpaCluster
1026
metadata:

tests/templates/kuttl/aas-user-info/30-assert.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ kind: TestAssert
44
metadata:
55
name: test-regorule
66
commands:
7-
- script: kubectl exec -n $NAMESPACE test-regorule-0 -- python /tmp/test-regorule.py -u 'http://test-opa-server-default:8081/v1/data/stackable/opa/userinfo/v1'
7+
- script: kubectl exec -n $NAMESPACE test-regorule-0 -- python /tmp/test-regorule.py -u 'http://test-opa-server-default:8081/v1/data/test'

tests/templates/kuttl/keycloak-user-info/10-install-opa.yaml.j2

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ commands:
55
- script: |
66
kubectl apply -n $NAMESPACE -f - <<EOF
77
---
8+
apiVersion: v1
9+
kind: ConfigMap
10+
metadata:
11+
name: test
12+
labels:
13+
opa.stackable.tech/bundle: "true"
14+
data:
15+
test.rego: |
16+
package test
17+
18+
userInfoByUsername(username) := http.send({"method": "POST", "url": "http://127.0.0.1:9476/user", "body": {"username": username}, "headers": {"Content-Type": "application/json"}, "raise_error": true}).body
19+
userInfoById(id) := http.send({"method": "POST", "url": "http://127.0.0.1:9476/user", "body": {"id": id}, "headers": {"Content-Type": "application/json"}, "raise_error": true}).body
20+
21+
currentUserInfoByUsername := userInfoByUsername(input.username)
22+
currentUserInfoById := userInfoById(input.id)
23+
---
824
apiVersion: opa.stackable.tech/v1alpha1
925
kind: OpaCluster
1026
metadata:

tests/templates/kuttl/keycloak-user-info/30-assert.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ kind: TestAssert
44
metadata:
55
name: test-regorule
66
commands:
7-
- script: kubectl exec -n $NAMESPACE test-regorule-0 -- python /tmp/test-regorule.py -u 'http://test-opa-server-default:8081/v1/data/stackable/opa/userinfo/v1'
7+
- script: kubectl exec -n $NAMESPACE test-regorule-0 -- python /tmp/test-regorule.py -u 'http://test-opa-server-default:8081/v1/data/test'

0 commit comments

Comments
 (0)