Skip to content

Commit

Permalink
use templating in the fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Apr 26, 2024
1 parent ba0dcb1 commit 5af3b40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fixtures/k8s/kubernetes_resource_pod_exit_code_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ spec:
- apiVersion: v1
kind: Pod
metadata:
name: hello-world
name: "hello-world-{{strings.ToLower (random.Alpha 10)}}"
namespace: default
spec:
restartPolicy: Never
containers:
- name: hello-world
image: hello-world
waitFor:
expr: 'dyn(resources).all(r, k8s.isHealthy(r))'
expr: "dyn(resources).all(r, k8s.isHealthy(r))"
interval: "1s"
timeout: "20s"
checkRetries:
Expand All @@ -37,7 +37,7 @@ spec:
namespaceSelector:
name: default
resource:
name: hello-world
name: "{{(index .resources 0).Object.metadata.name}}"
test:
expr: >
size(results) == 1 &&
Expand Down

0 comments on commit 5af3b40

Please sign in to comment.