-
Notifications
You must be signed in to change notification settings - Fork 87
/
teststep_crd.yaml
108 lines (107 loc) · 5.13 KB
/
teststep_crd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: teststeps.kuttl.dev
spec:
group: kuttl.dev
names:
kind: TestStep
plural: teststeps
scope: Namespaced
versions:
- name: v1beta1
served: true # served as to allow IDEs to remotely load them and offer coding assistance
storage: true
schema:
openAPIV3Schema: #! inlined from teststep-json-schema.yaml where authoring is made easier. See https://github.com/crossplane/crossplane/issues/3197#issuecomment-1191479570 for details
description: The TestStep object can be used to specify settings for a test step and can be specified in any test step YAML
type: object
properties:
delete:
description: |
A list of objects to delete, if they do not already exist, at the beginning of the test step.
The test harness will wait for the objects to be successfully deleted before applying the objects in the step.
type: array
items:
type: object
apiVersion:
type: string
description: The Kubernetes API version of the objects to delete.
kind:
description: The Kubernetes kind of the objects to delete.
type: string
name:
description: |
If specified, the name of the object to delete.
If not specified, all objects that match the specified labels will be deleted.
type: string
namespace:
description: The namespace of the objects to delete.
type: string
labels:
description: |
If specified, a label selector to use when looking up objects to delete.
If both labels and name are unspecified, then all resources of the specified kind in the namespace will be deleted.
type: object
apply:
type: array
description: A list of files to apply as part of this step. Specified path is relative to that in which the step occurs.
items:
type: string
assert:
type: array
description: A list of files to assert as part of this step. See documentation for [asserts and errors](asserts-errors.md) for more information. Specified path is relative to that in which the step occurs.
items:
type: string
error:
type: array
description: A list of files to error as part of this step. See documentation for [asserts and errors](asserts-errors.md) for more information. Specified path is relative to that in which the step occurs.
items:
type: string
index:
description: Override the test step's index.
type: integer
unitTest:
type: boolean
description: Indicates that this is a unit test - safe to run without a real Kubernetes cluster.
commands:
description: Commands to run prior at the beginning of the test step.
type: array
items:
description: The Command object is used to enable running commands in tests
type: object
properties:
command:
description: The command and argument to run as a string.
type: string
script:
description: |
Allows a shell script to run
- namespaced and command should not be used with script.
- namespaced is ignored and command is an error.
- env expansion is depended upon the shell but ENV is passed to the runtime env.
type: string
namespaced:
description: |
If set, the --namespace flag will be appended to the command with the namespace to use
(the test namespace for a test step or "default" for the test suite).
type: boolean
ignoreFailure:
description: If set, failures will be ignored.
type: boolean
background:
description: |
If this command is to be started in the background.
These are only support in TestSuites.
type: boolean
skipLogOutput:
description: |
If set, the output from the command is not logged.
Useful for sensitive logs or to reduce noise.
type: boolean
timeout:
description: Override the TestSuite timeout for this command (in seconds).
type: integer
kubeconfig:
type: string
description: Kubeconfig to use when applying and asserting for this step. Optional.