Skip to content

Implement fail field #1

@jaypipes

Description

@jaypipes

Currently, the assert field contains a set of assertions that are checked by gdt-kube. These assertions are retried until successful evaluation or a timeout (defaulting to 5s).

However, we want the ability to tell gdt-kube that if a certain condition is matched, that we should immediately fail the test. This would allow test authors to declare, for example, "if this Pod Ready condition goes to False, then fail the test and don't retry"

Possible example schema for the fail field:

tests:
 - kube.get: deployments/nginx
   fail:
     matches:
       spec:
         replicas: 1
   assert:
     matches:
       status:
         readyReplicas: 2

So, the above would attempt to find a status.readyReplicas field value of 2 for a default timeout of 5 seconds, but if at any time the spec.replicas field value is 1, then the test would immediately fail.

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