Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ metadata:
name: create-ldap-user
commands:
# We need to replace $NAMESPACE (by KUTTL) in the create-authentication-classes.yaml(.j2)
- script: eval "echo \"$(cat create-authentication-classes.yaml)\"" | kubectl apply -f -
- script: >
envsubst '$NAMESPACE' < create-authentication-classes.yaml |
kubectl apply --filename=-
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
# We need to replace $NAMESPACE (by KUTTL) in the add_user.yaml(.j2)
- script: eval "echo \"$(cat add_user.yaml)\"" | kubectl replace -f -
- script: >
envsubst '$NAMESPACE' < add_user.yaml |
kubectl replace --filename=-
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
# We need to replace $NAMESPACE (by KUTTL) in the remove_user.yaml(.j2)
- script: eval "echo \"$(cat remove_user.yaml)\"" | kubectl replace -f -
- script: >
envsubst '$NAMESPACE' < remove_user.yaml |
kubectl replace --filename=-
10 changes: 9 additions & 1 deletion tests/templates/kuttl/authentication/33-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@ timeout: 600
commands:
# We use the check-active-workers script for the login. Since we do want to wait until we cannot log in anymore
# we flip the return value in the end.
- script: kubectl exec -n $NAMESPACE trino-test-helper-0 -- python /tmp/check-active-workers.py -u hot_reloaded -p hot_reloaded -c trino-coordinator-default-headless.$NAMESPACE.svc.cluster.local -w 1; if [ $? -eq 0 ]; then exit 1; fi
- script: |
set +e
kubectl exec -n $NAMESPACE trino-test-helper-0 -- \
python /tmp/check-active-workers.py -u hot_reloaded -p hot_reloaded -c trino-coordinator-default-headless.$NAMESPACE.svc.cluster.local -w 1
if [ $? -eq 1 ]; then
exit 0
else
exit 1
fi
2 changes: 2 additions & 0 deletions tests/templates/kuttl/authentication/add_user.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: Secret
metadata:
name: password-file-users
namespace: $NAMESPACE
annotations:
restarter.stackable.tech/ignore: "true"
stringData:
test_user_1: test_user_1
test_user_2: test_user_2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ kind: Secret
metadata:
name: password-file-users
namespace: $NAMESPACE
annotations:
restarter.stackable.tech/ignore: "true"
stringData:
test_user_1: test_user_1
test_user_2: test_user_2
Expand Down
2 changes: 2 additions & 0 deletions tests/templates/kuttl/authentication/remove_user.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: Secret
metadata:
name: password-file-users
namespace: $NAMESPACE
annotations:
restarter.stackable.tech/ignore: "true"
stringData:
test_user_1: test_user_1
test_user_2: test_user_2
Loading