Skip to content

Commit dda07d2

Browse files
committed
Migrate tests to use regolib
1 parent 7174021 commit dda07d2

File tree

4 files changed

+2
-34
lines changed

4 files changed

+2
-34
lines changed

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,6 @@ 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-
---
248
apiVersion: opa.stackable.tech/v1alpha1
259
kind: OpaCluster
2610
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/test'
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'

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,6 @@ 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-
---
248
apiVersion: opa.stackable.tech/v1alpha1
259
kind: OpaCluster
2610
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/test'
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'

0 commit comments

Comments
 (0)