-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path00-assert.yaml
More file actions
27 lines (26 loc) · 1.07 KB
/
00-assert.yaml
File metadata and controls
27 lines (26 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -----------------------------------------------------------------------------
# 00-assert.yaml - KUTTL TestAssert for drag-and-drop workflow status
#
# This TestAssert script checks the status of the workflow created by the
# drag-and-drop test in the Codefresh GitOps Operator component tests.
#
# Usage:
# This assertion is executed as part of the KUTTL test suite.
#
# Steps performed:
# - Queries the workflow status for the specific release.
# - Asserts that the workflow status is 'Succeeded'.
# -----------------------------------------------------------------------------
---
apiVersion: kuttl.dev/v1beta1
commands:
- script: >
STATUS="$(kubectl get workflow -n codefresh -l codefresh.io/release=682051c15f0ea1658a3eed78 -o jsonpath="{.items[*].status.phase}")"
if [ $STATUS = 'Succeeded' ]; then
echo "workflow status for release '682051c15f0ea1658a3eed78' has succeeded"
else
echo "workflow status ($STATUS) for release '682051c15f0ea1658a3eed78' should be succeeded"
exit 1
fi
kind: TestAssert
timeout: 240