@@ -89,7 +89,9 @@ func testAppWithStartCmd(t *testing.T, context spec.G, it spec.S) {
8989
9090 response , err := http .Get (fmt .Sprintf ("http://localhost:%s" , container .HostPort ("8080" )))
9191 Expect (err ).NotTo (HaveOccurred ())
92- defer response .Body .Close ()
92+ defer func () {
93+ Expect (response .Body .Close ()).To (Succeed ())
94+ }()
9395
9496 Expect (response .StatusCode ).To (Equal (http .StatusOK ))
9597
@@ -145,7 +147,9 @@ func testAppWithStartCmd(t *testing.T, context spec.G, it spec.S) {
145147
146148 response , err := http .Get (fmt .Sprintf ("http://localhost:%s" , container .HostPort ("8080" )))
147149 Expect (err ).NotTo (HaveOccurred ())
148- defer response .Body .Close ()
150+ defer func () {
151+ Expect (response .Body .Close ()).To (Succeed ())
152+ }()
149153
150154 Expect (response .StatusCode ).To (Equal (http .StatusOK ))
151155
@@ -162,7 +166,7 @@ func testAppWithStartCmd(t *testing.T, context spec.G, it spec.S) {
162166 Eventually (cLogs ).Should (ContainSubstring ("start:dev" ))
163167 })
164168
165- it ("builds a working OCI image and runs a start cmd with arg" , func () {
169+ it ("builds a working OCI image and runs a start cmd with arg" , func () {
166170 var err error
167171 source , err = occam .Source (filepath .Join ("testdata" , "app_with_start_cmd" ))
168172 Expect (err ).NotTo (HaveOccurred ())
@@ -194,7 +198,9 @@ it("builds a working OCI image and runs a start cmd with arg", func() {
194198
195199 response , err := http .Get (fmt .Sprintf ("http://localhost:%s" , container .HostPort ("8080" )))
196200 Expect (err ).NotTo (HaveOccurred ())
197- defer response .Body .Close ()
201+ defer func () {
202+ Expect (response .Body .Close ()).To (Succeed ())
203+ }()
198204
199205 Expect (response .StatusCode ).To (Equal (http .StatusOK ))
200206
0 commit comments