Skip to content

Commit

Permalink
Substring matching
Browse files Browse the repository at this point in the history
  • Loading branch information
jennydaman committed Mar 27, 2024
1 parent e55c46d commit a8b2206
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-chris.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ jobs:
run: kubectl wait --for=condition=ready pod -n ghactions -l app.kubernetes.io/name=chris-server --timeout=300s
- name: Assert superuser created
run: |
actual="$(kubectl logs --tail=1 -n ghactions -l app.kubernetes.io/name=chris-heart -c set-config)"
actual="$(kubectl logs -n ghactions -l app.kubernetes.io/name=chris-heart -c set-config)"
expected='Created superuser "khris"'
if [ "$actual" != "$expected" ]; then
if [[ "$actual" != *"$expected"* ]]; then
echo "::error ::Expected: >>>$expected<<< Actual: >>>$actual<<<"
exit 1
fi
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
run: |
actual="$(kubectl get secret -n ghactions khris-test-chris-superuser -o jsonpath='{.data.password}' | base64 --decode)"
expected="newpassword1234"
if [ "$actual" != "$expected" ]; then
if [[ "$actual" != *"$expected"* ]]; then
echo "::error ::Expected: >>>$expected<<< Actual: >>>$actual<<<"
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion charts/chris/templates/heart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ spec:
print(f'Updated password for user "{existing_user.username}"')
else:
created_user = User.objects.create_user(**the_chris_user_config)
print(f'Created superuser "{created_user.username}"')
print(f'Created user "{created_user.username}"')
{{- include "cube.container" . | nindent 10 }}
- name: CHRIS_SUPERUSER_USERNAME
Expand Down

0 comments on commit a8b2206

Please sign in to comment.