Skip to content

Commit

Permalink
wip: debug example
Browse files Browse the repository at this point in the history
Signed-off-by: thediveo <[email protected]>
  • Loading branch information
thediveo committed Jun 24, 2024
1 parent 06b3079 commit 25a07e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example_session_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
"fmt"
"time"

"os/exec"

"github.com/thediveo/morbyd"
"github.com/thediveo/morbyd/ipam"
"github.com/thediveo/morbyd/net"
Expand Down Expand Up @@ -70,6 +72,9 @@ func ExampleSession_CreateNetwork() {
30*time.Second)
defer cancel()

cmdout, _ := exec.Command("sh", "-c", "for name in $(docker network ls --format '{{.Name}}'); do docker network inspect --format '{{.Name}}: {{.IPAM}}' $name; done").Output()
panic(string(cmdout))

sess, err := morbyd.NewSession(ctx,
session.WithAutoCleaning("test.morbyd=example.session.network"))
if err != nil {
Expand Down

0 comments on commit 25a07e7

Please sign in to comment.