Skip to content

Commit

Permalink
Merge pull request #22 from haarchri/feature/crossplane-trace
Browse files Browse the repository at this point in the history
feat(crossplane-cli): during apply check XRs with crossplane beta trace
  • Loading branch information
sergenyalcin authored Aug 22, 2024
2 parents cff48e2 + 9b2178f commit 15cbf92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/templates/00-assert.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ kind: TestAssert
timeout: {{ .TestCase.Timeout }}
commands:
- command: ${KUBECTL} annotate managed --all upjet.upbound.io/test=true --overwrite
- script: if [ -n "${CROSSPLANE_CLI}" ]; then ${KUBECTL} get composite --no-headers -o name | while read -r comp; do [ -n "$comp" ] && ${CROSSPLANE_CLI} beta trace "$comp"; done; fi
- script: echo "Dump MR manifests for the apply assertion step:"; ${KUBECTL} get managed -o yaml
- script: echo "Dump Claim manifests for the apply assertion step:" || ${KUBECTL} get claim --all-namespaces -o yaml
{{- range $resource := .Resources }}
Expand Down
5 changes: 5 additions & 0 deletions internal/templates/renderer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ kind: TestAssert
timeout: 10
commands:
- command: ${KUBECTL} annotate managed --all upjet.upbound.io/test=true --overwrite
- script: if [ -n "${CROSSPLANE_CLI}" ]; then ${KUBECTL} get composite --no-headers -o name | while read -r comp; do [ -n "$comp" ] && ${CROSSPLANE_CLI} beta trace "$comp"; done; fi
- script: echo "Dump MR manifests for the apply assertion step:"; ${KUBECTL} get managed -o yaml
- script: echo "Dump Claim manifests for the apply assertion step:" || ${KUBECTL} get claim --all-namespaces -o yaml
- command: ${KUBECTL} wait s3.aws.upbound.io/example-bucket --for=condition=Test --timeout 10s
Expand Down Expand Up @@ -200,6 +201,7 @@ kind: TestAssert
timeout: 10
commands:
- command: ${KUBECTL} annotate managed --all upjet.upbound.io/test=true --overwrite
- script: if [ -n "${CROSSPLANE_CLI}" ]; then ${KUBECTL} get composite --no-headers -o name | while read -r comp; do [ -n "$comp" ] && ${CROSSPLANE_CLI} beta trace "$comp"; done; fi
- script: echo "Dump MR manifests for the apply assertion step:"; ${KUBECTL} get managed -o yaml
- script: echo "Dump Claim manifests for the apply assertion step:" || ${KUBECTL} get claim --all-namespaces -o yaml
- command: /tmp/bucket/pre-assert.sh
Expand Down Expand Up @@ -319,6 +321,7 @@ kind: TestAssert
timeout: 10
commands:
- command: ${KUBECTL} annotate managed --all upjet.upbound.io/test=true --overwrite
- script: if [ -n "${CROSSPLANE_CLI}" ]; then ${KUBECTL} get composite --no-headers -o name | while read -r comp; do [ -n "$comp" ] && ${CROSSPLANE_CLI} beta trace "$comp"; done; fi
- script: echo "Dump MR manifests for the apply assertion step:"; ${KUBECTL} get managed -o yaml
- script: echo "Dump Claim manifests for the apply assertion step:" || ${KUBECTL} get claim --all-namespaces -o yaml
- command: ${KUBECTL} wait s3.aws.upbound.io/example-bucket --for=condition=Test --timeout 10s
Expand Down Expand Up @@ -416,6 +419,7 @@ kind: TestAssert
timeout: 10
commands:
- command: ${KUBECTL} annotate managed --all upjet.upbound.io/test=true --overwrite
- script: if [ -n "${CROSSPLANE_CLI}" ]; then ${KUBECTL} get composite --no-headers -o name | while read -r comp; do [ -n "$comp" ] && ${CROSSPLANE_CLI} beta trace "$comp"; done; fi
- script: echo "Dump MR manifests for the apply assertion step:"; ${KUBECTL} get managed -o yaml
- script: echo "Dump Claim manifests for the apply assertion step:" || ${KUBECTL} get claim --all-namespaces -o yaml
- command: /tmp/bucket/pre-assert.sh
Expand Down Expand Up @@ -515,6 +519,7 @@ kind: TestAssert
timeout: 10
commands:
- command: ${KUBECTL} annotate managed --all upjet.upbound.io/test=true --overwrite
- script: if [ -n "${CROSSPLANE_CLI}" ]; then ${KUBECTL} get composite --no-headers -o name | while read -r comp; do [ -n "$comp" ] && ${CROSSPLANE_CLI} beta trace "$comp"; done; fi
- script: echo "Dump MR manifests for the apply assertion step:"; ${KUBECTL} get managed -o yaml
- script: echo "Dump Claim manifests for the apply assertion step:" || ${KUBECTL} get claim --all-namespaces -o yaml
- command: /tmp/bucket/pre-assert.sh
Expand Down

0 comments on commit 15cbf92

Please sign in to comment.