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:
parent
1c018dbff7
commit
b305cd102d
@ -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))
|
||||
}
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user