Skip to content

Commit bebf98c

Browse files
fix to run scaling test (#292)
1 parent 61a796b commit bebf98c

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

test/e2e/scaling_test.go

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,29 +81,31 @@ func TestHelmScaleUp(t *testing.T) {
8181
t.Logf("====Setting helm chart path to %s", helmChartPath)
8282
t.Logf("====Installing Helm Chart")
8383
podZeroName := testUtil.HelmInstall(t, options, releaseName, kubectlOptions, helmChartPath)
84+
podOneName := releaseName + "-1"
8485

8586
// wait until first pod is in Ready status
8687
k8s.WaitUntilPodAvailable(t, kubectlOptions, podZeroName, 30, 10*time.Second)
8788

88-
newOptions := &helm.Options{
89-
KubectlOptions: kubectlOptions,
90-
SetValues: map[string]string{
91-
"persistence.enabled": "true",
92-
"replicaCount": "2",
93-
"image.repository": imageRepo,
94-
"image.tag": imageTag,
95-
"logCollection.enabled": "false",
96-
"auth.adminUsername": username,
97-
"auth.adminPassword": password,
98-
},
99-
}
89+
if !runUpgradeTest {
90+
newOptions := &helm.Options{
91+
KubectlOptions: kubectlOptions,
92+
SetValues: map[string]string{
93+
"persistence.enabled": "true",
94+
"replicaCount": "2",
95+
"image.repository": imageRepo,
96+
"image.tag": imageTag,
97+
"logCollection.enabled": "false",
98+
"auth.adminUsername": username,
99+
"auth.adminPassword": password,
100+
},
101+
}
100102

101-
t.Logf("====Scaling up pods using helm upgrade")
102-
helm.Upgrade(t, newOptions, helmChartPath, releaseName)
103+
t.Logf("====Scaling up pods using helm upgrade")
104+
helm.Upgrade(t, newOptions, helmChartPath, releaseName)
103105

104-
podOneName := releaseName + "-1"
105-
// wait until second pod is in Ready status
106-
k8s.WaitUntilPodAvailable(t, kubectlOptions, podOneName, 30, 10*time.Second)
106+
// wait until second pod is in Ready status
107+
k8s.WaitUntilPodAvailable(t, kubectlOptions, podOneName, 30, 10*time.Second)
108+
}
107109

108110
if runUpgradeTest {
109111
upgradeOptionsMap := map[string]string{

0 commit comments

Comments
 (0)