Skip to content

Commit

Permalink
Add tempest options
Browse files Browse the repository at this point in the history
This patch introduces a set of parameters for the tempestRun section
in the Tempest CR. This field parameters allow a user to specify
parameters with which tempest command should be executed inside
the Tempest pod.

The documentation is updated as well so that it demonstrates how the
new field should be utilized.
  • Loading branch information
lpiwowar committed Nov 10, 2023
1 parent 8c6bcd2 commit abfc40c
Show file tree
Hide file tree
Showing 8 changed files with 216 additions and 106 deletions.
37 changes: 23 additions & 14 deletions api/bases/test.openstack.org_tempests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,34 @@ spec:
tempestRun:
description: TempestSpec TempestRun parts
properties:
allowedTests:
default:
- tempest.api.identity.v3
description: AllowedTests
items:
type: string
type: array
concurrency:
default: -1
description: Concurrency is the Default concurrency
format: int64
type: integer
skippedTests:
description: SkippedTests
items:
type: string
type: array
excludeList:
default: ""
description: ExcludeList
type: string
includeList:
default: tempest.api.identity.v3
description: IncludeList
type: string
parallel:
default: true
description: Run tests in parallel
type: boolean
serial:
default: false
description: Serial run
type: boolean
smoke:
default: false
description: Smoke tests
type: boolean
workerFile:
description: WorkerFile is the detailed concurry spec file
default: ""
description: WorkerFile is the detailed concurrency spec file
type: string
type: object
tempestconfRun:
Expand Down Expand Up @@ -210,7 +219,7 @@ spec:
description: Output file
type: string
overrides:
default: ""
default: identity.v3_endpoint_type public
description: Override options
type: string
profile:
Expand Down
31 changes: 24 additions & 7 deletions api/v1beta1/tempest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,38 @@ type Hash struct {
// TempestSpec TempestRun parts
type TempestRunSpec struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default={"tempest.api.identity.v3"}
// AllowedTests
AllowedTests []string `json:"allowedTests,omitempty"`
// +kubebuilder:default="tempest.api.identity.v3"
// IncludeList
IncludeList string `json:"includeList,omitempty"`

// +kubebuilder:validation:Optional
// SkippedTests
SkippedTests []string `json:"skippedTests,omitempty"`
// +kubebuilder:default=""
// ExcludeList
ExcludeList string `json:"excludeList,omitempty"`

// +kubebuilder:validation:Optional
// +kubebuilder:default:=-1
// Concurrency is the Default concurrency
Concurrency int64 `json:"concurrency,omitempty"`

// +kubebuilder:validation:Optional
// WorkerFile is the detailed concurry spec file
// +kubebuilder:default:=false
// Smoke tests
Smoke bool `json:"smoke,omitempty"`

// +kubebuilder:validation:Optional
// +kubebuilder:default:=true
// Run tests in parallel
Parallel bool `json:"parallel,omitempty"`

// +kubebuilder:validation:Optional
// +kubebuilder:default:=false
// Serial run
Serial bool `json:"serial,omitempty"`

// +kubebuilder:validation:Optional
// +kubebuilder:default:=""
// WorkerFile is the detailed concurrency spec file
WorkerFile string `json:"workerFile,omitempty"`
}

Expand Down Expand Up @@ -169,7 +186,7 @@ type TempestconfRunSpec struct {
Remove string `json:"remove"`

// +kubebuilder:validation:Optional
// +kubebuilder:default=""
// +kubebuilder:default="identity.v3_endpoint_type public"
// Override options
Overrides string `json:"overrides"`

Expand Down
12 changes: 1 addition & 11 deletions api/v1beta1/zz_generated.deepcopy.go

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

37 changes: 23 additions & 14 deletions config/crd/bases/test.openstack.org_tempests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,34 @@ spec:
tempestRun:
description: TempestSpec TempestRun parts
properties:
allowedTests:
default:
- tempest.api.identity.v3
description: AllowedTests
items:
type: string
type: array
concurrency:
default: -1
description: Concurrency is the Default concurrency
format: int64
type: integer
skippedTests:
description: SkippedTests
items:
type: string
type: array
excludeList:
default: ""
description: ExcludeList
type: string
includeList:
default: tempest.api.identity.v3
description: IncludeList
type: string
parallel:
default: true
description: Run tests in parallel
type: boolean
serial:
default: false
description: Serial run
type: boolean
smoke:
default: false
description: Smoke tests
type: boolean
workerFile:
description: WorkerFile is the detailed concurry spec file
default: ""
description: WorkerFile is the detailed concurrency spec file
type: string
type: object
tempestconfRun:
Expand Down Expand Up @@ -210,7 +219,7 @@ spec:
description: Output file
type: string
overrides:
default: ""
default: identity.v3_endpoint_type public
description: Override options
type: string
profile:
Expand Down
19 changes: 16 additions & 3 deletions config/samples/test_v1beta1_tempest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,23 @@ metadata:
spec:
containerImage: quay.io/podified-antelope-centos9/openstack-tempest:current-podified
tempestRun:
allowedTests:
- tempest.api.identity.v3.*
# NOTE: All parameters have default values (use only when you want to override
# the default behaviour)
includeList: | # <-- Use | to preserve \n
tempest.api.identity.v3.*
concurrency: 8
pythonTempestconfRun:
# excludeList:
# - tempest.api.identity.v3.*
# workerFile: | # <-- use | to preserver \n
# - worker:
# - tempest.api.*
# - neutron_tempest_tests
# - worker:
# - tempest.scenario.*
# smoke: false
# serial: false
# parallel: true
tempestconfRun:
# NOTE: All parameters have default values (use only when you want to override
# the default behaviour)
# create: true
Expand Down
Loading

0 comments on commit abfc40c

Please sign in to comment.