Skip to content

implement fail-if #19

Open
Open
@jaypipes

Description

@jaypipes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions