Skip to content

Commit

Permalink
Update tests to verify repo server addr bug fix
Browse files Browse the repository at this point in the history
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
  • Loading branch information
svghadi committed Jan 21, 2024
1 parent 5f8c897 commit 60d36d3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
name: argocd
name: example
status:
phase: Available
notificationsController: Running
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
name: argocd
name: example
spec:
notifications:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
test-webhook:
method: POST
body: |
{"created":"{{.app.metadata.name}}"}
{"created":"{{.app.metadata.name}}","type":"{{(call .repo.GetAppDetails).Type}}"}
trigger.test-on-created: |-
- description: Application is created.
send: ["test-app-created"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ commands:
path: test/examples/nginx
targetRevision: HEAD
EOF
- script: sleep 5
- script: sleep 10
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ commands:
# verify no x509 in notifications-controller logs
- script: |
#!/bin/bash
kubectl -n $NAMESPACE logs deployment.apps/argocd-notifications-controller | grep "x509"
kubectl -n $NAMESPACE logs deployment.apps/example-notifications-controller | grep "x509"
PREV_CMD=$?
if [ $PREV_CMD -eq 1 ]; then
Expand All @@ -15,11 +15,10 @@ commands:
# verify notification delivery
- script: |
#!/bin/bash
kubectl -n $NAMESPACE logs deployment.apps/webhook | grep '{"created":"my-app-3"}'
PREV_CMD=$?
if [ $PREV_CMD -eq 0 ]; then
exit 0
else
exit 1
fi
# delays could occur in receiving notification, hence retry before failing
for i in {1..5}
do
sleep 5
kubectl -n $NAMESPACE logs deployment.apps/webhook | grep '{"created":"my-app-3","type":"Directory"}' && break
done

0 comments on commit 60d36d3

Please sign in to comment.