Skip to content

Commit ed8122d

Browse files
committed
[tempest re-run] Fix behavior for workflows
In current case, when there is a global value specified on top level (i.e. non-workflow level, that should be applied to all workflows) and no workflow-specific value is provided, that global value will always be overridden with the default from workflow-level (i.e. the global value will be ineffective when workflows are used). This commit adjusts it, so value on workflow-level is optional and has no default – in such case for the workflow-level the value from top level will be applied (unless something is explicitly defined on workflow-level).
1 parent e632356 commit ed8122d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

api/v1beta1/tempest_types_workflow.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,18 +255,16 @@ type WorkflowTempestSpec struct {
255255

256256
// +kubebuilder:validation:Optional
257257
// +operator-sdk:csv:customresourcedefinitions:type=spec
258-
// +kubebuilder:default:=false
259258
// Activate tempest re-run feature. When activated, tempest will perform
260259
// another run of the tests that failed during the first execution.
261-
RerunFailedTests bool `json:"rerunFailedTests"`
260+
RerunFailedTests *bool `json:"rerunFailedTests,omitempty"`
262261

263262
// +kubebuilder:validation:Optional
264263
// +operator-sdk:csv:customresourcedefinitions:type=spec
265-
// +kubebuilder:default:=false
266264
// Allow override of exit status with the tempest re-run feature.
267265
// When activated, the original return value of the tempest run will be
268266
// overridden with a result of the tempest run on the set of failed tests.
269-
RerunOverrideStatus bool `json:"rerunOverrideStatus"`
267+
RerunOverrideStatus *bool `json:"rerunOverrideStatus,omitempty"`
270268

271269
// +kubebuilder:validation:Optional
272270
// +operator-sdk:csv:customresourcedefinitions:type=spec

0 commit comments

Comments
 (0)