Skip to content

Commit

Permalink
Update docker_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: Manuel de la Peña <social.mdelapenya@gmail.com>
  • Loading branch information
kuisathaverat and mdelapenya committed Nov 8, 2023
1 parent edb15d7 commit cd1e554
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1162,12 +1162,18 @@ func ExampleContainer_Stop() {
log.Fatalf("failed to terminate container: %s", err)
}
}()
fmt.Println("Container has been started")
timeout := 10 * time.Second
_ = nginxC.Stop(ctx, &timeout)
err = nginxC.Stop(ctx, &timeout)
if err != nil {
panic(err)
}

fmt.Print("you have a running and stop the container")
fmt.Println("Container has been stopped")

// Output: you have a running and stop the container
// Output:
// Container has been started
// Container has been stopped
}

func ExampleContainer_MappedPort() {
Expand Down

0 comments on commit cd1e554

Please sign in to comment.