Skip to content

Commit

Permalink
fix: handle error in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Sep 20, 2023
1 parent 90e591d commit 1f74955
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion generic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ func TestWithStartupCommand(t *testing.T) {

c, err := GenericContainer(context.Background(), req)
require.NoError(t, err)
defer c.Terminate(context.Background())
defer func() {
err = c.Terminate(context.Background())
require.NoError(t, err)
}()

_, reader, err := c.Exec(context.Background(), []string{"ls", "/tmp/.testcontainers"}, exec.Multiplexed())
require.NoError(t, err)
Expand Down

0 comments on commit 1f74955

Please sign in to comment.