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

feat: [TKC-1579] make test suite steps params oss - cherry-pick to main (#225) #226

Merged
merged 1 commit into from
Mar 6, 2024
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
49 changes: 46 additions & 3 deletions api/testsuite/v3/testsuite_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package v3

import (
commonv1 "github.com/kubeshop/testkube-operator/api/common/v1"
"github.com/kubeshop/testkube-operator/pkg/tcl/testsuitestcl"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -53,8 +52,8 @@ type TestSuiteStepSpec struct {
// delay duration in time units
// +kubebuilder:validation:Type:=string
// +kubebuilder:validation:Format:=duration
Delay metav1.Duration `json:"delay,omitempty"`
ExecutionRequest *testsuitestcl.TestSuiteStepExecutionRequest `json:"executionRequest,omitempty"`
Delay metav1.Duration `json:"delay,omitempty"`
ExecutionRequest *TestSuiteStepExecutionRequest `json:"executionRequest,omitempty"`
}

// options to download artifacts from previous steps
Expand Down Expand Up @@ -190,3 +189,47 @@ type TestSuiteList struct {
func init() {
SchemeBuilder.Register(&TestSuite{}, &TestSuiteList{})
}

type ArgsModeType commonv1.ArgsModeType

// TestSuiteStepExecutionRequest contains parameters to be used by the executions.
// These fields will be passed to the execution when a Test Suite is queued for execution.
// TestSuiteStepExecutionRequest parameters have the highest priority. They override the
// values coming from Test Suites, Tests, and Test Executions.
// +kubebuilder:object:generate=true
type TestSuiteStepExecutionRequest struct {
// test execution labels
ExecutionLabels map[string]string `json:"executionLabels,omitempty"`
Variables map[string]Variable `json:"variables,omitempty"`
// additional executor binary arguments
Args []string `json:"args,omitempty"`
// usage mode for arguments
ArgsMode ArgsModeType `json:"argsMode,omitempty"`
// executor binary command
Command []string `json:"command,omitempty"`
// whether to start execution sync or async
Sync bool `json:"sync,omitempty"`
// http proxy for executor containers
HttpProxy string `json:"httpProxy,omitempty"`
// https proxy for executor containers
HttpsProxy string `json:"httpsProxy,omitempty"`
// negative test will fail the execution if it is a success and it will succeed if it is a failure
NegativeTest bool `json:"negativeTest,omitempty"`
// job template extensions
JobTemplate string `json:"jobTemplate,omitempty"`
// job template extensions reference
JobTemplateReference string `json:"jobTemplateReference,omitempty"`
// cron job template extensions
CronJobTemplate string `json:"cronJobTemplate,omitempty"`
// cron job template extensions reference
CronJobTemplateReference string `json:"cronJobTemplateReference,omitempty"`
// scraper template extensions
ScraperTemplate string `json:"scraperTemplate,omitempty"`
// scraper template extensions reference
ScraperTemplateReference string `json:"scraperTemplateReference,omitempty"`
// pvc template extensions
PvcTemplate string `json:"pvcTemplate,omitempty"`
// pvc template extensions reference
PvcTemplateReference string `json:"pvcTemplateReference,omitempty"`
RunningContext *commonv1.RunningContext `json:"runningContext,omitempty"`
}
48 changes: 46 additions & 2 deletions api/testsuite/v3/zz_generated.deepcopy.go

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

61 changes: 0 additions & 61 deletions pkg/tcl/testsuitestcl/steps.go

This file was deleted.

78 changes: 0 additions & 78 deletions pkg/tcl/testsuitestcl/zz_generated.deepcopy.go

This file was deleted.

Loading