Skip to content

Commit 52cce4b

Browse files
author
Kate Osborn
committed
Print output of failed command
1 parent 704b949 commit 52cce4b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/suite/graceful_recovery_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,18 @@ func runRestartNodeTest(teaURL, coffeeURL string, files []string, ns *core.Names
133133
}
134134

135135
if drain {
136-
_, err := exec.Command(
136+
output, err := exec.Command(
137137
"kubectl",
138138
"drain",
139139
kindNodeName,
140140
"--ignore-daemonsets",
141141
"--delete-local-data",
142142
).CombinedOutput()
143-
Expect(err).ToNot(HaveOccurred())
144143

145-
_, err = exec.Command("kubectl", "delete", "node", kindNodeName).CombinedOutput()
146-
Expect(err).ToNot(HaveOccurred())
144+
Expect(err).ToNot(HaveOccurred(), string(output))
145+
146+
output, err = exec.Command("kubectl", "delete", "node", kindNodeName).CombinedOutput()
147+
Expect(err).ToNot(HaveOccurred(), string(output))
147148
}
148149

149150
_, err = exec.Command("docker", "restart", containerName).CombinedOutput()

0 commit comments

Comments
 (0)