Skip to content

Commit b867bef

Browse files
committed
Move checks on clusterName earlier
1 parent 33d2aec commit b867bef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/suite/graceful_recovery_test.go

+4-4
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)