From 6396dbe900f3ca9b44c75dc141bf9a1f3c15b531 Mon Sep 17 00:00:00 2001 From: Lilla Vass Date: Fri, 23 Feb 2024 09:55:00 +0100 Subject: [PATCH] feat: [TKC-1055] test suite steps persistence (#219) * feat: test suite steps persistence * fix: remove unused fields --- Makefile | 1 + api/common/v1/args.go | 14 + api/common/v1/runningcontext.go | 20 + api/common/v1/variables.go | 1 + api/common/v1/zz_generated.deepcopy.go | 40 ++ api/tests/v3/test_types.go | 31 +- api/testsuite/v3/testsuite_types.go | 4 +- api/testsuite/v3/zz_generated.deepcopy.go | 10 +- .../bases/tests.testkube.io_testsuites.yaml | 585 ++++++++++++++++++ internal/controller/tests/test_controller.go | 3 +- licenses/TCL.txt | 391 ++++++++++++ pkg/tcl/README.md | 7 + pkg/tcl/header.txt | 7 + pkg/tcl/testsuitestcl/steps.go | 61 ++ .../testsuitestcl/zz_generated.deepcopy.go | 78 +++ 15 files changed, 1221 insertions(+), 32 deletions(-) create mode 100644 api/common/v1/args.go create mode 100644 api/common/v1/runningcontext.go create mode 100644 api/common/v1/zz_generated.deepcopy.go create mode 100644 licenses/TCL.txt create mode 100644 pkg/tcl/README.md create mode 100644 pkg/tcl/header.txt create mode 100644 pkg/tcl/testsuitestcl/steps.go create mode 100644 pkg/tcl/testsuitestcl/zz_generated.deepcopy.go diff --git a/Makefile b/Makefile index 693c6bc6..239f3ebc 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." + $(CONTROLLER_GEN) object:headerFile="pkg/tcl/header.txt" paths="./pkg/tcl/..." fmt: ## Run go fmt against code. go fmt ./... diff --git a/api/common/v1/args.go b/api/common/v1/args.go new file mode 100644 index 00000000..c0a28475 --- /dev/null +++ b/api/common/v1/args.go @@ -0,0 +1,14 @@ +package v1 + +// ArgsModeType defines args mode type +// +kubebuilder:validation:Enum=append;override;replace +type ArgsModeType string + +const ( + // ArgsModeTypeAppend for append args mode + ArgsModeTypeAppend ArgsModeType = "append" + // ArgsModeTypeOverride for override args mode + ArgsModeTypeOverride ArgsModeType = "override" + // ArgsModeTypeReplace for replace args mode + ArgsModeTypeReplace ArgsModeType = "replace" +) diff --git a/api/common/v1/runningcontext.go b/api/common/v1/runningcontext.go new file mode 100644 index 00000000..3e33d53e --- /dev/null +++ b/api/common/v1/runningcontext.go @@ -0,0 +1,20 @@ +package v1 + +// RunningContext for test or test suite execution +type RunningContext struct { + // One of possible context types + Type_ RunningContextType `json:"type"` + // Context value depending from its type + Context string `json:"context,omitempty"` +} + +type RunningContextType string + +const ( + RunningContextTypeUserCLI RunningContextType = "user-cli" + RunningContextTypeUserUI RunningContextType = "user-ui" + RunningContextTypeTestSuite RunningContextType = "testsuite" + RunningContextTypeTestTrigger RunningContextType = "testtrigger" + RunningContextTypeScheduler RunningContextType = "scheduler" + RunningContextTypeEmpty RunningContextType = "" +) diff --git a/api/common/v1/variables.go b/api/common/v1/variables.go index 44a9095e..5a10fb29 100644 --- a/api/common/v1/variables.go +++ b/api/common/v1/variables.go @@ -4,6 +4,7 @@ import ( corev1 "k8s.io/api/core/v1" ) +// +kubebuilder:object:generate=true type Variable struct { // variable type Type_ string `json:"type,omitempty"` diff --git a/api/common/v1/zz_generated.deepcopy.go b/api/common/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000..eddf59bf --- /dev/null +++ b/api/common/v1/zz_generated.deepcopy.go @@ -0,0 +1,40 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1 + +import () + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Variable) DeepCopyInto(out *Variable) { + *out = *in + in.ValueFrom.DeepCopyInto(&out.ValueFrom) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. +func (in *Variable) DeepCopy() *Variable { + if in == nil { + return nil + } + out := new(Variable) + in.DeepCopyInto(out) + return out +} diff --git a/api/tests/v3/test_types.go b/api/tests/v3/test_types.go index 9ff89287..e5a6e697 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -136,24 +136,7 @@ type ArtifactRequest struct { SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` } -// RunningContext for test or test suite execution -type RunningContext struct { - // One of possible context types - Type_ RunningContextType `json:"type"` - // Context value depending from its type - Context string `json:"context,omitempty"` -} - -type RunningContextType string - -const ( - RunningContextTypeUserCLI RunningContextType = "user-cli" - RunningContextTypeUserUI RunningContextType = "user-ui" - RunningContextTypeTestSuite RunningContextType = "testsuite" - RunningContextTypeTestTrigger RunningContextType = "testtrigger" - RunningContextTypeScheduler RunningContextType = "scheduler" - RunningContextTypeEmpty RunningContextType = "" -) +type RunningContext commonv1.RunningContext // pod request body type PodRequest struct { @@ -258,17 +241,7 @@ type ExecutionRequest struct { } // ArgsModeType defines args mode type -// +kubebuilder:validation:Enum=append;override;replace -type ArgsModeType string - -const ( - // ArgsModeTypeAppend for append args mode - ArgsModeTypeAppend ArgsModeType = "append" - // ArgsModeTypeOverride for override args mode - ArgsModeTypeOverride ArgsModeType = "override" - // ArgsModeTypeReplace for replace args mode - ArgsModeTypeReplace ArgsModeType = "replace" -) +type ArgsModeType commonv1.ArgsModeType // Reference to env resource type EnvReference struct { diff --git a/api/testsuite/v3/testsuite_types.go b/api/testsuite/v3/testsuite_types.go index 70668660..5a0b1bf5 100644 --- a/api/testsuite/v3/testsuite_types.go +++ b/api/testsuite/v3/testsuite_types.go @@ -18,6 +18,7 @@ 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" ) @@ -52,7 +53,8 @@ type TestSuiteStepSpec struct { // delay duration in time units // +kubebuilder:validation:Type:=string // +kubebuilder:validation:Format:=duration - Delay metav1.Duration `json:"delay,omitempty"` + Delay metav1.Duration `json:"delay,omitempty"` + ExecutionRequest *testsuitestcl.TestSuiteStepExecutionRequest `json:"executionRequest,omitempty"` } // options to download artifacts from previous steps diff --git a/api/testsuite/v3/zz_generated.deepcopy.go b/api/testsuite/v3/zz_generated.deepcopy.go index d079906c..3f1d8692 100644 --- a/api/testsuite/v3/zz_generated.deepcopy.go +++ b/api/testsuite/v3/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ limitations under the License. package v3 import ( + "github.com/kubeshop/testkube-operator/pkg/tcl/testsuitestcl" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -103,7 +104,9 @@ func (in *TestSuiteBatchStep) DeepCopyInto(out *TestSuiteBatchStep) { if in.Execute != nil { in, out := &in.Execute, &out.Execute *out = make([]TestSuiteStepSpec, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } } @@ -277,6 +280,11 @@ func (in *TestSuiteStatus) DeepCopy() *TestSuiteStatus { func (in *TestSuiteStepSpec) DeepCopyInto(out *TestSuiteStepSpec) { *out = *in out.Delay = in.Delay + if in.ExecutionRequest != nil { + in, out := &in.ExecutionRequest, &out.ExecutionRequest + *out = new(testsuitestcl.TestSuiteStepExecutionRequest) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepSpec. diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index 26a77640..db97469f 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -591,6 +591,201 @@ spec: description: delay duration in time units format: duration type: string + executionRequest: + description: 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. + properties: + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + cronJobTemplateReference: + description: cron job template extensions reference + type: string + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + httpProxy: + description: http proxy for executor containers + type: string + httpsProxy: + description: https proxy for executor containers + type: string + jobTemplate: + description: job template extensions + type: string + jobTemplateReference: + description: job template extensions reference + type: string + name: + description: test execution custom name + type: string + namespace: + description: test kubernetes namespace (\"testkube\" + when not set) + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it is + a failure + type: boolean + pvcTemplate: + description: pvc template extensions + type: string + pvcTemplateReference: + description: pvc template extensions reference + type: string + runningContext: + description: RunningContext for test or test suite + execution + properties: + context: + description: Context value depending from its + type + type: string + type: + description: One of possible context types + type: string + required: + - type + type: object + scraperTemplate: + description: scraper template extensions + type: string + scraperTemplateReference: + description: scraper template extensions reference + type: string + sync: + description: whether to start execution sync or async + type: boolean + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: + supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, + requests.cpu, requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + type: object test: description: object name type: string @@ -634,6 +829,201 @@ spec: description: delay duration in time units format: duration type: string + executionRequest: + description: 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. + properties: + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + cronJobTemplateReference: + description: cron job template extensions reference + type: string + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + httpProxy: + description: http proxy for executor containers + type: string + httpsProxy: + description: https proxy for executor containers + type: string + jobTemplate: + description: job template extensions + type: string + jobTemplateReference: + description: job template extensions reference + type: string + name: + description: test execution custom name + type: string + namespace: + description: test kubernetes namespace (\"testkube\" + when not set) + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it is + a failure + type: boolean + pvcTemplate: + description: pvc template extensions + type: string + pvcTemplateReference: + description: pvc template extensions reference + type: string + runningContext: + description: RunningContext for test or test suite + execution + properties: + context: + description: Context value depending from its + type + type: string + type: + description: One of possible context types + type: string + required: + - type + type: object + scraperTemplate: + description: scraper template extensions + type: string + scraperTemplateReference: + description: scraper template extensions reference + type: string + sync: + description: whether to start execution sync or async + type: boolean + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: + supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, + requests.cpu, requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + type: object test: description: object name type: string @@ -843,6 +1233,201 @@ spec: description: delay duration in time units format: duration type: string + executionRequest: + description: 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. + properties: + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + cronJobTemplateReference: + description: cron job template extensions reference + type: string + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + httpProxy: + description: http proxy for executor containers + type: string + httpsProxy: + description: https proxy for executor containers + type: string + jobTemplate: + description: job template extensions + type: string + jobTemplateReference: + description: job template extensions reference + type: string + name: + description: test execution custom name + type: string + namespace: + description: test kubernetes namespace (\"testkube\" + when not set) + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it is + a failure + type: boolean + pvcTemplate: + description: pvc template extensions + type: string + pvcTemplateReference: + description: pvc template extensions reference + type: string + runningContext: + description: RunningContext for test or test suite + execution + properties: + context: + description: Context value depending from its + type + type: string + type: + description: One of possible context types + type: string + required: + - type + type: object + scraperTemplate: + description: scraper template extensions + type: string + scraperTemplateReference: + description: scraper template extensions reference + type: string + sync: + description: whether to start execution sync or async + type: boolean + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: + supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, + requests.cpu, requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + type: object test: description: object name type: string diff --git a/internal/controller/tests/test_controller.go b/internal/controller/tests/test_controller.go index d3f7b461..e943ae15 100644 --- a/internal/controller/tests/test_controller.go +++ b/internal/controller/tests/test_controller.go @@ -28,6 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" templatesv1 "github.com/kubeshop/testkube-operator/api/template/v1" testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" "github.com/kubeshop/testkube-operator/pkg/cronjob" @@ -84,7 +85,7 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. data, err := json.Marshal(testsv3.ExecutionRequest{ RunningContext: &testsv3.RunningContext{ - Type_: testsv3.RunningContextTypeScheduler, + Type_: commonv1.RunningContextTypeScheduler, Context: test.Spec.Schedule, }, }) diff --git a/licenses/TCL.txt b/licenses/TCL.txt new file mode 100644 index 00000000..ee5b74c2 --- /dev/null +++ b/licenses/TCL.txt @@ -0,0 +1,391 @@ +Testkube Community License Agreement + +Please read this Testkube Community License Agreement (the “Agreement”) +carefully before using Testkube (as defined below), which is offered by +Testkube or its affiliated Legal Entities (“Testkube”). + +By accessing, installing, downloading or in any manner using Testkube, +You agree that You have read and agree to be bound by the terms of this +Agreement. If You are accessing Testkube on behalf of a Legal Entity, +You represent and warrant that You have the authority to agree to these +terms on its behalf and the right to bind that Legal Entity to this +Agreement. Use of Testkube is expressly conditioned upon Your assent to +all the terms of this Agreement, as well as the other Testkube agreements, +including the Testkube Privacy Policy and Testkube Terms and Conditions, +accessible at: https://testkube.io/privacy-policy and +https://testkube.io/terms-and-conditions. + +1. Definitions. In addition to other terms defined elsewhere in this Agreement +and in the other Testkube agreements, the terms below have the following +meanings. + +(a) “Testkube” shall mean the Test Orchestration and Execution software +provided by Testkube, including both Testkube Core and Testkube Pro, as +defined below. + +(b) “Testkube Core” shall mean the version and features of Testkube designated +as free of charge at https://testkube.io/pricing and available at +https://github.com/kubeshop/testkube pursuant to the terms of the MIT license. + +(c) “Testkube Pro” shall mean the version of Testkube which includes the +additional paid features of Testkube designated at +https://testkube.io/pricing and made available by Testkube, also at +https://github.com/kubeshop/testkube, the use of which is subject to additional +terms set out below. + +(d) “Contribution” shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Testkube for +inclusion in the Work by the copyright owner or by an individual or Legal Entity +authorized to submit on behalf of the copyright owner. For the purposes of this +definition, “submitted” means any form of electronic, verbal, or written +communication sent to Testkube or its representatives, including but not +limited to communication on electronic mailing lists, source code control +systems, and issue tracking systems that are managed by, or on behalf of, +Testkube for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated in writing +by the copyright owner as “Not a Contribution.” + +(e) “Contributor” shall mean any copyright owner or individual or Legal Entity +authorized by the copyright owner, other than Testkube, from whom Testkube +receives a Contribution that Testkube subsequently incorporates within the Work. + +(f) “Derivative Works” shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work, such as a translation, abridgement, +condensation, or any other recasting, transformation, or adaptation for which +the editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. For the purposes of this +License, Derivative Works shall not include works that remain separable from, or +merely link (or bind by name) to the interfaces of, the Work and Derivative +Works thereof. You may create certain Derivative Works of Testkube Pro (“Pro +Derivative Works”, as defined below) provided that such Pro Derivative Works +are solely created, distributed, and accessed for Your internal use, and are +not created, distributed, or accessed in such a way that the Pro Derivative +Works would modify, circumvent, or otherwise bypass controls implemented, if +any, to ensure that Testkube Pro users comply with the terms of the Paid Pro +License. Notwithstanding anything contained herein to the contrary, You may not +modify or alter the Source of Testkube Pro absent Testkube’s prior express +written permission. If You have any questions about creating Pro Derivative +Works or otherwise modifying or redistributing Testkube Pro, please contact +Testkube at support@testkube.io. + +(g) “Legal Entity” shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with that +entity. For the purposes of this definition, “control” means (i) the power, +direct or indirect, to cause the direction or management of such entity, whether +by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of +the outstanding shares, or (iii) beneficial ownership of such entity. + +(h) “License” shall mean the terms and conditions for use, reproduction, and +distribution of a Work as defined by this Agreement. + +(i) “Licensor” shall mean Testkube or a Contributor, as applicable. + +(j) “Object” form shall mean any form resulting from mechanical transformation +or translation of a Source form, including but not limited to compiled object +code, generated documentation, and conversions to other media types. + +(k) “Source” form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, and +configuration files. + +(l) “Third Party Works” shall mean Works, including Contributions, and other +technology owned by a person or Legal Entity other than Testkube, as indicated +by a copyright notice that is included in or attached to such Works or technology. + +(m) “Work” shall mean the work of authorship, whether in Source or Object form, +made available under a License, as indicated by a copyright notice that is +included in or attached to the work. + +(n) “You” (or “Your”) shall mean an individual or Legal Entity exercising +permissions granted by this License. + +2. Licenses. + +(a) License to Testkube Core. The License for the applicable version of +Testkube Core can be found on the Testkube Licensing FAQs page and in the +applicable license file within the Testkube GitHub repository(ies). Testkube +Core is a no-cost, entry-level license and as such, contains the following +disclaimers: NOTWITHSTANDING ANYTHING TO THE CONTRARY HEREIN, TESTKUBE CORE +IS PROVIDED “AS IS” AND “AS AVAILABLE”, AND ALL EXPRESS OR IMPLIED WARRANTIES +ARE EXCLUDED AND DISCLAIMED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND ANY +WARRANTIES ARISING BY STATUTE OR OTHERWISE IN LAW OR FROM COURSE OF DEALING, +COURSE OF PERFORMANCE, OR USE IN TRADE. For clarity, the terms of this Agreement, +other than the relevant definitions in Section 1 and this Section 2(a) do not +apply to Testkube Core. + +(b) License to Testkube Pro. + +(i) Grant of Copyright License: Subject to the terms of this Agreement, Licensor +hereby grants to You a worldwide, non-exclusive, non-transferable limited +license to reproduce, prepare Pro Derivative Works (as defined below) of, +publicly display, publicly perform, sublicense, and distribute Testkube Pro for +Your business purposes, for so long as You are not in violation of this +Section 2(b) and are current on all payments required by Section 4 below. + +(ii) Grant of Patent License: Subject to the terms of this Agreement, Licensor +hereby grants to You a worldwide, non-exclusive, non-transferable limited patent +license to make, have made, use, and import Testkube Pro, where such license +applies only to those patent claims licensable by Licensor that are necessarily +infringed by their Contribution(s) alone or by combination of their +Contribution(s) with the Work to which such Contribution(s) was submitted. If You +institute patent litigation against any entity (including a cross-claim or +counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated +within the Work constitutes direct or contributory patent infringement, then any +patent licenses granted to You under this License for that Work shall terminate +as of the date such litigation is filed. + +(iii) License to Third Party Works: From time to time Testkube may use, or +provide You access to, Third Party Works in connection with Testkube Pro. You +acknowledge and agree that in addition to this Agreement, Your use of Third Party +Works is subject to all other terms and conditions set forth in the License +provided with or contained in such Third Party Works. Some Third Party Works may +be licensed to You solely for use with Testkube Pro under the terms of a third +party License, or as otherwise notified by Testkube, and not under the terms of +this Agreement. You agree that the owners and third party licensors of Third +Party Works are intended third party beneficiaries to this Agreement, and You +agree to abide by all third party terms and conditions and licenses. + +3. Support. From time to time, in its sole discretion, Testkube may offer +professional services or support for Testkube, which may now or in the future be +subject to additional fees, as outlined at https://testkube.io/pricing. + +4. Fees for Testkube Pro or Testkube Support. + +(a) Fees. The License to Testkube Pro is conditioned upon Your entering into a +subscription agreement with Testkube for its use (a “Paid Pro License”) and +timely paying Testkube for such Paid Pro License; provided that features of +Testkube Pro that are features of Testkube Core and are not designated as “Pro +features” at https://testkube.io/pricing may be used for free under the terms of +the Agreement without a Paid Pro License. Testkube Pro may at its discretion +include within Testkube Pro certain Source code solely intended to determine +Your compliance with the Paid Pro License which may be accessed without a Paid +Pro License, provided that under no circumstances may You modify Testkube Pro +to circumvent the Paid Pro License requirement. Any professional services or +support for Testkube may also be subject to Your payment of fees, which will be +specified by Testkube when you sign up to receive such professional services or +support. Testkube reserves the right to change the fees at any time with prior +written notice; for recurring fees, any such adjustments will take effect as of +the next pay period. + +(b) Overdue Payments and Taxes. Overdue payments are subject to a service charge +equal to the lesser of 1.5% per month or the maximum legal interest rate allowed +by law, and You shall pay all Testkube reasonable costs of collection, including +court costs and attorneys’ fees. Fees are stated and payable in U.S. dollars and +are exclusive of all sales, use, value added and similar taxes, duties, +withholdings and other governmental assessments (but excluding taxes based on +Testkube income) that may be levied on the transactions contemplated by this +Agreement in any jurisdiction, all of which are Your responsibility unless you +have provided Testkube with a valid tax-exempt certificate. If You owe Testkube +overdue payments, Testkube reserves the right to revoke any license(s) granted +by this Agreement and revoke to Your access to Testkube Core and to Testkube Pro. + +(c) Record-keeping and Audit. If fees for Testkube Pro are based on the number +of environments running on Testkube Pro or another use-based unit of measurement, +including number of users, You must maintain complete and accurate records with +respect Your use of Testkube Pro and will provide such records to Testkube for +inspection or audit upon Testkube’s reasonable request. If an inspection or +audit uncovers additional usage by You for which fees are owed under this +Agreement, then You shall pay for such additional usage at Testkube’s +then-current rates. + +5. Trial License. If You have signed up for a trial or evaluation of Testkube +Pro, Your License to Testkube Pro is granted without charge for the trial or +evaluation period specified when You signed up, or if no term was specified, for +forty-five (45) calendar days, provided that Your License is granted solely for +purposes of Your internal evaluation of Testkube Pro during the trial or +evaluation period (a “Trial License”). You may not use Testkube Pro or any +Testkube Pro features under a Trial License more than once in any twelve (12) +month period. Testkube may revoke a Trial License at any time and for any reason. +Sections 3, 4, 9 and 11 of this Agreement do not apply to Trial Licenses. + +6. Redistribution. You may reproduce and distribute copies of the Work or +Derivative Works thereof in any medium, with or without modifications, and in +Source or Object form, provided that You meet the following conditions: + +(a) You must give any other recipients of the Work or Derivative Works a copy of +this License; and + +(b) You must cause any modified files to carry prominent notices stating that +You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works that You +distribute, including for internal purposes at Your Legal Entities, all +copyright, patent, trademark, and attribution notices from the Source form of +the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and + +(d) If the Work includes a “NOTICE” or equivalent text file as part of its +distribution, then any Derivative Works that You distribute must include a +readable copy of the attribution notices contained within such NOTICE file, +excluding those notices that do not pertain to any part of the Derivative Works, +in at least one of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or documentation, if +provided along with the Derivative Works; or, within a display generated by the +Derivative Works, if and wherever such third-party notices normally appear. The +contents of the NOTICE or equivalent files are for informational purposes only +and do not modify the License. You may add Your own attribution notices within +Derivative Works that You distribute for Your internal use, alongside or as an +addendum to the NOTICE text from the Work, provided that such additional +attribution notices cannot be construed as modifying the License. + +You may not create Derivative Works, including Pro Derivative Works (as defined +below), which add Your own copyright statements or provide additional or +different license terms and conditions for use, reproduction, or distribution of +Your modifications, or for any such Derivative Works as a whole. All Derivative +Works, including Your use, reproduction, and distribution of the Work, must +comply in all respects with the conditions stated in this License. + +(e) Pro Derivative Works: Derivative Works of Testkube Pro (“Pro Derivative +Works”) may only be made, reproduced and distributed, without modifications, in +Source or Object form, provided that such Pro Derivative Works are solely for +Your internal use. Each Pro Derivative Work shall be governed by this Agreement, +shall include a License to Testkube Pro, and thus will be subject to the payment +of fees to Testkube by any user of the Pro Derivative Work. + +7. Submission of Contributions. Unless You explicitly state otherwise, any +Contribution submitted for inclusion in Testkube Pro by You to Testkube shall be +under the terms and conditions of this Agreement, without any additional terms +or conditions, payments of royalties or otherwise to Your benefit. Testkube may +at any time, at its sole discretion, elect for the Contribution to be subject to +the Paid Pro License. If You wish to reserve any rights regarding Your +Contribution, You must contact Testkube at support@testkube.io prior to +submitting the Contribution. + +8. Trademarks. This License does not grant permission to use the trade names, +trademarks, service marks, or product names of Licensor, except as required for +reasonable and customary use in describing the origin of the Work and reproducing +the content of the NOTICE or equivalent file. + +9. Limited Warranty. + +(a) Warranties. Subject to the terms of the Paid Pro License, or any other +agreement between You and Testkube which governs the terms of Your access to +Testkube Pro, Testkube warrants to You that: (i) Testkube Pro will materially +perform in accordance with the applicable documentation for thirty (30) days +after initial delivery to You; and (ii) any professional services performed by +Testkube under this Agreement will be performed in a workmanlike manner, in +accordance with general industry standards. + +(b) Exclusions. Testkube’s warranties in this Section 9 do not extend to problems +that result from: (i) Your failure to implement updates issued by Testkube during +the warranty period; (ii) any alterations or additions (including Pro Derivative +Works and Contributions) to Testkube not performed by or at the direction of +Testkube; (iii) failures that are not reproducible by Testkube; (iv) operation +of Testkube Pro in violation of this Agreement or not in accordance with its +documentation; (v) failures caused by software, hardware, or products not +licensed or provided by Testkube hereunder; or (vi) Third Party Works. + +(c) Remedies. In the event of a breach of a warranty under this Section 9, +Testkube will, at its discretion and cost, either repair, replace or re-perform +the applicable Works or services or refund a portion of fees previously paid to +Testkube that are associated with the defective Works or services. This is Your +exclusive remedy, and Testkube’s sole liability, arising in connection with the +limited warranties herein and shall, in all cases, be limited to the fees paid +to Testkube in the three (3) months preceding the delivery of the defective Works +or services. + +10. Disclaimer of Warranty. Except as set out in Section 9, unless required by +applicable law, Licensor provides the Work (and each Contributor provides its +Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +either express or implied, arising out of course of dealing, course of +performance, or usage in trade, including, without limitation, any warranties +or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, CORRECTNESS, +RELIABILITY, or FITNESS FOR A PARTICULAR PURPOSE, all of which are hereby +disclaimed. You are solely responsible for determining the appropriateness of +using or redistributing Works and assume any risks associated with Your exercise +of permissions under the applicable License for such Works. + +11. Limited Indemnity. + +(a) Indemnity. Testkube will defend, indemnify and hold You harmless against +any third party claims, liabilities or expenses incurred (including reasonable +attorneys’ fees), as well as amounts finally awarded in a settlement or a +non-appealable judgement by a court (“Losses”), to the extent arising from any +claim or allegation by a third party that Testkube Pro infringes or +misappropriates a valid United States patent, copyright, or trade secret right +of a third party; provided that You give Testkube: (i) prompt written notice of +any such claim or allegation; (ii) sole control of the defense and settlement +thereof; and (iii) reasonable cooperation and assistance in such defense or +settlement. If any Work within Testkube Pro becomes or in Testkube’s opinion is +likely to become, the subject of an injunction, Testkube may, at its option, +(A) procure for You the right to continue using such Work, (B) replace or modify +such Work so that it becomes non-infringing without substantially compromising +its functionality, or, if (A) and (B) are not commercially practicable, then (C) +terminate Your license to the allegedly infringing Work and refund to You a +prorated portion of the prepaid and unearned fees for such infringing Work. The +foregoing comprises the entire liability of Testkube with respect to infringement +of patents, copyrights, trade secrets, or other intellectual property rights. + +(b) Exclusions. The foregoing obligations on Testkube shall not apply to: (i) +Works modified by any party other than Testkube (including Pro Derivative Works +and Contributions) where the alleged infringement relates to such modification, +(ii) Works combined or bundled with any products, processes, or materials not +provided by Testkube where the alleged infringement relates to such combination, +(iii) use of a version of Testkube Pro other than the version that was current at +the time of such use, as long as a non-infringing version had been released at +the time of the alleged infringement, (iv) any Works created to Your +specifications, (v) infringement or misappropriation of any proprietary or +intellectual property right in which You have an interest, or (vi) Third Party +Works. You will defend, indemnify, and hold Testkube harmless against any Losses +arising from any such claim or allegation as described in the scenarios in this +Section 11(b), subject to conditions reciprocal to those in Section 11(a). + +12. Limitation of Liability. In no event and under no legal or equitable theory, +whether in tort (including negligence), contract, or otherwise, unless required +by applicable law (such as deliberate and grossly negligent acts), and +notwithstanding anything in this Agreement to the contrary, shall Licensor or +any Contributor be liable to You for (i) any amounts in excess, in the aggregate, +of the fees paid by You to Testkube under this Agreement in the twelve (12) +months preceding the date the first cause of liability arose, or (ii) any +indirect, special, incidental, punitive, exemplary, reliance, or consequential +damages of any character arising as a result of this Agreement or out of the use +or inability to use the Work (including but not limited to damages for loss of +goodwill, profits, data or data use, work stoppage, computer failure or +malfunction, cost of procurement of substitute goods, technology or services, +or any and all other commercial damages or losses), even if such Licensor or +Contributor has been advised of the possibility of such damages. THESE +LIMITATIONS SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF +ANY LIMITED REMEDY. + +13. General. + +(a) Relationship of Parties. You and Testkube are independent contractors, and +nothing herein shall be deemed to constitute either party as the agent or +representative of the other or both parties as joint venturers or partners for +any purpose. + +(b) Export Control. You shall comply with the U.S. Foreign Corrupt Practices Act +and all applicable export laws, restrictions and regulations of the U.S. +Department of Commerce, U.S. Department of Treasury, and any other applicable +U.S. and foreign authority(ies). + +(c) Assignment. This Agreement and the rights and obligations herein may not be +assigned or transferred, in whole or in part, by You without the prior written +consent of Testkube. Any assignment in violation of this provision is void. This +Agreement shall be binding upon, and inure to the benefit of, the successors and +permitted assigns of the parties. + +(d) Governing Law. This Agreement shall be governed by and construed under the +laws of the State of Delaware and the United States without regard to conflicts +of laws provisions thereof, and without regard to the Uniform Computer +Information Transactions Act. + +(e) Attorneys’ Fees. In any action or proceeding to enforce rights under this +Agreement, the prevailing party shall be entitled to recover its costs, expenses, +and attorneys’ fees. + +(f) Severability. If any provision of this Agreement is held to be invalid, +illegal, or unenforceable in any respect, that provision shall be limited or +eliminated to the minimum extent necessary so that this Agreement otherwise +remains in full force and effect and enforceable. + +(g) Entire Agreement; Waivers; Modification. This Agreement constitutes the +entire agreement between the parties relating to the subject matter hereof and +supersedes all proposals, understandings, or discussions, whether written or +oral, relating to the subject matter of this Agreement and all past dealing or +industry custom. The failure of either party to enforce its rights under this +Agreement at any time for any period shall not be construed as a waiver of such +rights. No changes, modifications or waivers to this Agreement will be effective +unless in writing and signed by both parties. diff --git a/pkg/tcl/README.md b/pkg/tcl/README.md new file mode 100644 index 00000000..ccc5589e --- /dev/null +++ b/pkg/tcl/README.md @@ -0,0 +1,7 @@ +# Testkube Operator - TCL Package + +This folder contains special code with the Testkube Community license. + +## License + +The code in this folder is licensed under the Testkube Community License. Please see the [LICENSE](../../licenses/TCL.txt) file for more information. diff --git a/pkg/tcl/header.txt b/pkg/tcl/header.txt new file mode 100644 index 00000000..40349525 --- /dev/null +++ b/pkg/tcl/header.txt @@ -0,0 +1,7 @@ +// Copyright 2024 Testkube. +// +// Licensed as a Testkube Pro file under the Testkube Community +// License (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// https://github.com/kubeshop/testkube-operator/blob/main/licenses/TCL.txt diff --git a/pkg/tcl/testsuitestcl/steps.go b/pkg/tcl/testsuitestcl/steps.go new file mode 100644 index 00000000..95943761 --- /dev/null +++ b/pkg/tcl/testsuitestcl/steps.go @@ -0,0 +1,61 @@ +// Copyright 2024 Testkube. +// +// Licensed as a Testkube Pro file under the Testkube Community +// License (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// https://github.com/kubeshop/testkube-operator/blob/main/licenses/TCL.txt + +package testsuitestcl + +import ( + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" +) + +// +kubebuilder:object:generate=true +type Variable commonv1.Variable + +// +kubebuilder:object:generate=true +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"` +} diff --git a/pkg/tcl/testsuitestcl/zz_generated.deepcopy.go b/pkg/tcl/testsuitestcl/zz_generated.deepcopy.go new file mode 100644 index 00000000..c8c6c5b0 --- /dev/null +++ b/pkg/tcl/testsuitestcl/zz_generated.deepcopy.go @@ -0,0 +1,78 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2024 Testkube. +// +// Licensed as a Testkube Pro file under the Testkube Community +// License (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// https://github.com/kubeshop/testkube-operator/blob/main/licenses/TCL.txt + +// Code generated by controller-gen. DO NOT EDIT. + +package testsuitestcl + +import ( + "github.com/kubeshop/testkube-operator/api/common/v1" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStepExecutionRequest) DeepCopyInto(out *TestSuiteStepExecutionRequest) { + *out = *in + if in.ExecutionLabels != nil { + in, out := &in.ExecutionLabels, &out.ExecutionLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make(map[string]Variable, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(v1.RunningContext) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepExecutionRequest. +func (in *TestSuiteStepExecutionRequest) DeepCopy() *TestSuiteStepExecutionRequest { + if in == nil { + return nil + } + out := new(TestSuiteStepExecutionRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Variable) DeepCopyInto(out *Variable) { + *out = *in + in.ValueFrom.DeepCopyInto(&out.ValueFrom) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. +func (in *Variable) DeepCopy() *Variable { + if in == nil { + return nil + } + out := new(Variable) + in.DeepCopyInto(out) + return out +}