Skip to content

Commit

Permalink
Simplify with PostMortemLogs
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericgermain committed Aug 31, 2024
1 parent 8e1d062 commit 7e12e7e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/integration/extnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ func TestContainerIPsMultiNetwork(t *testing.T) {

// connectExtnet creates a docker network
func createExtnet(ctx context.Context, t *testing.T, profile string, extnetNetworkName string) {
defer PostMortemLogs(t, profile)

cmd := exec.CommandContext(ctx, "docker", "network", "create", extnetNetworkName)

result, err := Run(t, cmd)
Expand All @@ -102,6 +104,8 @@ func createExtnet(ctx context.Context, t *testing.T, profile string, extnetNetwo

// connectExtnet connects additional network to the minikube cluster
func connectExtnet(ctx context.Context, t *testing.T, profile string, extnetNetworkName string) {
defer PostMortemLogs(t, profile)

cmd := exec.CommandContext(ctx, "docker", "network", "connect", extnetNetworkName, profile)

result, err := Run(t, cmd)
Expand All @@ -114,6 +118,8 @@ func connectExtnet(ctx context.Context, t *testing.T, profile string, extnetNetw

// deleteExtnet removes the external network in docker
func deleteExtnet(ctx context.Context, t *testing.T, profile string, extnetNetworkName string) {
defer PostMortemLogs(t, profile)

cmd := exec.CommandContext(ctx, "docker", "network", "rm", extnetNetworkName)

result, err := Run(t, cmd)
Expand Down

0 comments on commit 7e12e7e

Please sign in to comment.