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

Introduce new parameter Expected Failures List #233

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
tempest.api.identity.admin.v3.test_credentials.CredentialsTestJSON
tempest.api.identity.admin.v3.test_tokens.TokensV3TestJSON.test_rescope_token
tempest.api.identity.admin.v3.test_users.UsersV3TestJSON.test_update_user_password
cifmw_test_operator_tempest_expected_failures_list: |
foobar
cifmw_tempest_tempestconf_config:
overrides: |
compute-feature-enabled.dhcp_domain ''
Expand Down
12 changes: 12 additions & 0 deletions api/bases/test.openstack.org_tempests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ spec:
description: A content of exclude.txt file that is passed to tempest
via --exclude-list
type: string
expectedFailuresList:
description: The expectedFailuresList parameter contains tests
that should not count as failures. When a test from this list
fails, the test pod ends with Completed state rather than with
Error state.
type: string
externalPlugin:
description: ExternalPlugin contains information about plugin
that should be installed within the tempest test pod. If this
Expand Down Expand Up @@ -603,6 +609,12 @@ spec:
description: A content of exclude.txt file that is passed
to tempest via --exclude-list
type: string
expectedFailuresList:
description: The expectedFailuresList parameter contains
tests that should not count as failures. When a test from
this list fails, the test pod ends with Completed state
rather than with Error state.
type: string
externalPlugin:
description: ExternalPlugin contains information about plugin
that should be installed within the tempest test pod.
Expand Down
7 changes: 7 additions & 0 deletions api/v1beta1/tempest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ type TempestRunSpec struct {
// A content of exclude.txt file that is passed to tempest via --exclude-list
ExcludeList string `json:"excludeList"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// The expectedFailuresList parameter contains tests that should not count
// as failures. When a test from this list fails, the test pod ends with
// Completed state rather than with Error state.
ExpectedFailuresList string `json:"expectedFailuresList"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// +kubebuilder:default:=0
Expand Down
7 changes: 7 additions & 0 deletions api/v1beta1/tempest_types_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ type WorkflowTempestRunSpec struct {
// A content of exclude.txt file that is passed to tempest via --exclude-list
ExcludeList *string `json:"excludeList,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// The expectedFailuresList parameter contains tests that should not count
// as failures. When a test from this list fails, the test pod ends with
// Completed state rather than with Error state.
ExpectedFailuresList *string `json:"expectedFailuresList,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// Concurrency value that is passed to tempest via --concurrency
Expand Down
5 changes: 5 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions config/crd/bases/test.openstack.org_tempests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ spec:
description: A content of exclude.txt file that is passed to tempest
via --exclude-list
type: string
expectedFailuresList:
description: The expectedFailuresList parameter contains tests
that should not count as failures. When a test from this list
fails, the test pod ends with Completed state rather than with
Error state.
type: string
externalPlugin:
description: ExternalPlugin contains information about plugin
that should be installed within the tempest test pod. If this
Expand Down Expand Up @@ -603,6 +609,12 @@ spec:
description: A content of exclude.txt file that is passed
to tempest via --exclude-list
type: string
expectedFailuresList:
description: The expectedFailuresList parameter contains
tests that should not count as failures. When a test from
this list fails, the test pod ends with Completed state
rather than with Error state.
type: string
externalPlugin:
description: ExternalPlugin contains information about plugin
that should be installed within the tempest test pod.
Expand Down
2 changes: 2 additions & 0 deletions config/samples/test_v1beta1_tempest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ spec:
concurrency: 8
# excludeList: | # <-- Use | to preserve \n
# tempest.api.identity.v3.*
# expectedFailuresList: | # <-- Use | to preserve \n
# tempest.api.identity.v3.test_tokens.TokensV3Test.test_create_token
# workerFile: | # <-- Use | to preserve \n
# - worker:
# - tempest.api.*
Expand Down
7 changes: 7 additions & 0 deletions controllers/tempest_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,13 @@ func (r *TempestReconciler) setTempestConfigVars(envVars map[string]string,
envVars["TEMPEST_EXCLUDE_LIST"] = testOperatorDir + excludeListFile
}

value = mergeWithWorkflow(tRun.ExpectedFailuresList, wtRun.ExpectedFailuresList)
if len(value) != 0 {
expectedFailuresListFile := "expected_failures.txt"
customData[expectedFailuresListFile] = value
envVars["TEMPEST_EXPECTED_FAILURES_LIST"] = testOperatorDir + expectedFailuresListFile
}

// Bool
tempestBoolEnvVars := map[string]bool{
"TEMPEST_SERIAL": mergeWithWorkflow(tRun.Serial, wtRun.Serial),
Expand Down
Loading