Skip to content

Commit 0f21ecd

Browse files
authored
Merge pull request #267 from weizhouapache/e2e-fix-network_interruption_toxi
e2e: restore secret name to original while running tests with ToxiProxy
2 parents 95c4417 + 7b0ef7a commit 0f21ecd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/e2e/toxiproxy/toxiProxy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,13 @@ func SetupForToxiProxyTestingACS(ctx context.Context, clusterName string, cluste
203203
Expect(err).To(BeNil())
204204

205205
// Override the test config to use this alternate cloud-config secret
206+
originalSecretName := e2eConfig.GetVariable("CLOUDSTACK_FD1_SECRET_NAME")
206207
e2eConfig.Variables["CLOUDSTACK_FD1_SECRET_NAME"] = toxiProxyFdEndpointSecret.Name
207208

208209
// Overriding e2e config file into a new temp copy, so as not to inadvertently override the other e2e tests.
209210
newConfigFilePath := fmt.Sprintf("/tmp/%v.yaml", toxiProxyName)
210211
editConfigFile(newConfigFilePath, configPath, "CLOUDSTACK_FD1_SECRET_NAME", toxiProxyFdEndpointSecret.Name)
212+
e2eConfig.Variables["CLOUDSTACK_FD1_SECRET_NAME"] = originalSecretName
211213

212214
// Return a context
213215
return &Context{

0 commit comments

Comments
 (0)