Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement fail-if #19

Open
jaypipes opened this issue Jun 27, 2024 · 0 comments
Open

implement fail-if #19

jaypipes opened this issue Jun 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jaypipes
Copy link
Member

jaypipes commented Jun 27, 2024

Allow the test author to specify a condition on which the test spec should fail (and stop retrying).

For example, let's say we want to create a Deployment and check that it gets to Complete, but that if the Deployment ever shows as failing to make progress, we should fail the test spec:

name: deployment-happy-path
description: create, get, delete a Deployment
fixtures:
  - kind
tests:
  - name: create-deployment
    kube:
      create: testdata/manifests/nginx-deployment.yaml
  - name: deployment-has-2-replicas
    timeout:
      after: 20s
    kube:
      get: deployments/nginx
    assert:
      conditions:
        Progressing:
          status: true
          reason: NewReplicaSetAvailable
    fail-if:
      conditions:
        Progressing: false
  - name: delete-deployment
    kube:
      delete: deployments/nginx
@jaypipes jaypipes added the enhancement New feature or request label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant