Skip to content

Commit 1624e1c

Browse files
fix correct order for network destroy step
1 parent 8909aaa commit 1624e1c

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

test/integration/networks/networks_test.go

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package networks
1616

1717
import (
1818
"fmt"
19+
"os"
1920
"strings"
2021
"testing"
2122
"time"
@@ -309,11 +310,24 @@ func TestNetworks(t *testing.T) {
309310
},
310311
}
311312

312-
for _, envName := range []string{
313-
"production",
314-
"development",
315-
"nonproduction",
316-
} {
313+
envStage := os.Getenv(utils.RUN_STAGE_ENV_VAR)
314+
var envNames []string
315+
316+
if strings.Contains(envStage, "teardown") {
317+
envNames = []string{
318+
"nonproduction",
319+
"development",
320+
"production",
321+
}
322+
} else {
323+
envNames = []string{
324+
"production",
325+
"development",
326+
"nonproduction",
327+
}
328+
}
329+
330+
for _, envName := range envNames {
317331
envName := envName
318332
t.Run(envName, func(t *testing.T) {
319333

0 commit comments

Comments
 (0)