Skip to content

Commit feb7955

Browse files
committed
Print command output when things fail
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
1 parent 1df1333 commit feb7955

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/e2e/disks_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var _ = Describe("Disk image generation", Label("raw-disks"), func() {
4444
Expect(out).To(ContainSubstring("download-squashfs"), out)
4545
Expect(out).To(ContainSubstring("extract-squashfs"), out)
4646
Expect(out).ToNot(ContainSubstring("container-pull"), out)
47-
Expect(err).ToNot(HaveOccurred())
47+
Expect(err).ToNot(HaveOccurred(), out)
4848
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw"))
4949
Expect(err).ToNot(HaveOccurred())
5050
})
@@ -66,7 +66,7 @@ var _ = Describe("Disk image generation", Label("raw-disks"), func() {
6666
Expect(out).To(ContainSubstring("download-squashfs"), out)
6767
Expect(out).To(ContainSubstring("extract-squashfs"), out)
6868
Expect(out).ToNot(ContainSubstring("container-pull"), out)
69-
Expect(err).ToNot(HaveOccurred())
69+
Expect(err).ToNot(HaveOccurred(), out)
7070
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw.gce"))
7171
Expect(err).ToNot(HaveOccurred())
7272
})
@@ -88,7 +88,7 @@ var _ = Describe("Disk image generation", Label("raw-disks"), func() {
8888
Expect(out).To(ContainSubstring("download-squashfs"), out)
8989
Expect(out).To(ContainSubstring("extract-squashfs"), out)
9090
Expect(out).ToNot(ContainSubstring("container-pull"), out)
91-
Expect(err).ToNot(HaveOccurred())
91+
Expect(err).ToNot(HaveOccurred(), out)
9292
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw.vhd"))
9393
Expect(err).ToNot(HaveOccurred())
9494
})
@@ -110,7 +110,7 @@ var _ = Describe("Disk image generation", Label("raw-disks"), func() {
110110
// Expect(out).To(ContainSubstring("download-squashfs"), out)
111111
// Expect(out).To(ContainSubstring("extract-squashfs"), out)
112112
// Expect(out).ToNot(ContainSubstring("container-pull"), out)
113-
// Expect(err).ToNot(HaveOccurred())
113+
// Expect(err).ToNot(HaveOccurred(), out)
114114
// _, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw.gce"))
115115
// Expect(err).ToNot(HaveOccurred())
116116
// })
@@ -185,7 +185,7 @@ stages:
185185
Expect(out).ToNot(ContainSubstring("build-arm-image"), out)
186186
Expect(out).To(ContainSubstring("gen-raw-disk"), out)
187187
Expect(out).To(ContainSubstring("container-pull"), out)
188-
Expect(err).ToNot(HaveOccurred())
188+
Expect(err).ToNot(HaveOccurred(), out)
189189
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw"))
190190
Expect(err).ToNot(HaveOccurred())
191191
})
@@ -206,7 +206,7 @@ stages:
206206
Expect(out).To(ContainSubstring("gen-raw-disk"), out)
207207
Expect(out).To(ContainSubstring("convert-gce"), out)
208208
Expect(out).To(ContainSubstring("container-pull"), out)
209-
Expect(err).ToNot(HaveOccurred())
209+
Expect(err).ToNot(HaveOccurred(), out)
210210
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw.gce"))
211211
Expect(err).ToNot(HaveOccurred())
212212
})
@@ -227,7 +227,7 @@ stages:
227227
Expect(out).To(ContainSubstring("gen-raw-disk"), out)
228228
Expect(out).To(ContainSubstring("convert-vhd"), out)
229229
Expect(out).To(ContainSubstring("container-pull"), out)
230-
Expect(err).ToNot(HaveOccurred())
230+
Expect(err).ToNot(HaveOccurred(), out)
231231
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw.vhd"))
232232
Expect(err).ToNot(HaveOccurred())
233233
})
@@ -248,7 +248,7 @@ stages:
248248
Expect(out).ToNot(ContainSubstring("build-arm-image"), out)
249249
Expect(out).To(ContainSubstring("gen-raw-mbr-disk"), out)
250250
Expect(out).To(ContainSubstring("container-pull"), out)
251-
Expect(err).ToNot(HaveOccurred())
251+
Expect(err).ToNot(HaveOccurred(), out)
252252
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw"))
253253
Expect(err).ToNot(HaveOccurred())
254254
})

0 commit comments

Comments
 (0)