Skip to content

Commit

Permalink
Ignore specific errors in package_test
Browse files Browse the repository at this point in the history
decorate output in `By()` to ensure it's identifiable
  • Loading branch information
aramprice committed Jul 19, 2024
1 parent 64ce5a8 commit 67aa324
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions integration/package/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ var _ = Describe("Package", func() {

Eventually(session, 60*time.Minute, 5*time.Second).Should(gexec.Exit(0))
var out []byte
_, err := session.Out.Write(out)
Expect(err).NotTo(HaveOccurred())
By(string(out))
_, _ = session.Out.Write(out)
By(fmt.Sprintf("session.Out: '%s'", string(out)))

expectedOSVersion := strings.Split(stembuildVersion, ".")[0]
expectedStemcellVersion := strings.Split(stembuildVersion, ".")[:2]
Expand Down Expand Up @@ -141,9 +140,8 @@ var _ = Describe("Package", func() {

Eventually(session, 60*time.Minute, 5*time.Second).Should(gexec.Exit(0))
var out []byte
_, err := session.Out.Write(out)
Expect(err).NotTo(HaveOccurred())
By(string(out))
_, _ = session.Out.Write(out)
By(fmt.Sprintf("session.Out: '%s'", string(out)))

expectedOSVersion := strings.Split(stembuildVersion, ".")[0]
expectedStemcellVersion := strings.Split(stembuildVersion, ".")[:2]
Expand Down Expand Up @@ -171,7 +169,9 @@ func copyFileFromTar(t string, f string, w io.Writer) {
Expect(err).NotTo(HaveOccurred())
gzr, err := gzip.NewReader(z)
Expect(err).NotTo(HaveOccurred())
defer gzr.Close()
defer func() {
_ = gzr.Close()
}()

r := tar.NewReader(gzr)
for {
Expand Down

0 comments on commit 67aa324

Please sign in to comment.