1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

kubernetesDeploy: Add kube-context parameter for helm test command (#4332)

* kubernetesDeploy: Add kube-context parameter for helm test command

* Resolve merge conflict
This commit is contained in:
Vyacheslav Starostin 2023-05-25 17:03:33 +06:00 committed by GitHub
parent 1c018dbff7
commit b305cd102d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -230,6 +230,10 @@ func runHelmDeploy(config kubernetesDeployOptions, utils kubernetes.DeployUtils,
"--namespace", config.Namespace,
}
if len(config.KubeContext) > 0 {
testParams = append(testParams, "--kube-context", config.KubeContext)
}
if config.DeployTool == "helm" {
testParams = append(testParams, "--timeout", strconv.Itoa(config.HelmTestWaitSeconds))
}

View File

@ -465,6 +465,8 @@ func TestRunKubernetesDeploy(t *testing.T) {
"deploymentName",
"--namespace",
"deploymentNamespace",
"--kube-context",
"testCluster",
"--timeout",
"400s",
}, mockUtils.Calls[2].Params, "Wrong test parameters")
@ -547,6 +549,8 @@ func TestRunKubernetesDeploy(t *testing.T) {
"deploymentName",
"--namespace",
"deploymentNamespace",
"--kube-context",
"testCluster",
"--timeout",
"400s",
"--logs",