Skip to content

Commit 9370b25

Browse files
committed
Move checks on clusterName earlier
1 parent 18d153b commit 9370b25

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/suite/graceful_recovery_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ func runRestartNodeTest(teaURL, coffeeURL string, files []string, ns *core.Names
124124

125125
kindNodeName := nodeNames[0]
126126

127+
Expect(clusterName).ToNot(BeNil(), "clusterName variable not set")
128+
Expect(*clusterName).ToNot(BeEmpty())
129+
containerName := *clusterName + "-control-plane"
130+
127131
if portFwdPort != 0 {
128132
close(portForwardStopCh)
129133
}
@@ -142,10 +146,6 @@ func runRestartNodeTest(teaURL, coffeeURL string, files []string, ns *core.Names
142146
Expect(err).ToNot(HaveOccurred())
143147
}
144148

145-
Expect(clusterName).ToNot(BeNil(), "clusterName variable not set")
146-
Expect(*clusterName).ToNot(BeEmpty())
147-
containerName := *clusterName + "-control-plane"
148-
149149
_, err = exec.Command("docker", "restart", containerName).CombinedOutput()
150150
Expect(err).ToNot(HaveOccurred())
151151

0 commit comments

Comments
 (0)