Skip to content

Commit 1018e17

Browse files
committed
fix: ignore network exists error
1 parent a5b7776 commit 1018e17

File tree

1 file changed

+5
-1
lines changed
  • framework/components/blockchain

1 file changed

+5
-1
lines changed

framework/components/blockchain/ton.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"os"
77
"os/exec"
8+
"strings"
89
"time"
910

1011
"github.com/testcontainers/testcontainers-go"
@@ -114,7 +115,10 @@ func newTon(in *Input) (*Output, error) {
114115
output, err := cmd.CombinedOutput()
115116
framework.L.Info().Str("output", string(output)).Msg("TON Docker network created")
116117
if err != nil {
117-
return nil, fmt.Errorf("failed to create docker network: %v", err)
118+
if !strings.Contains(string(output), "already exists") {
119+
return nil, fmt.Errorf("failed to create docker network: %v", err)
120+
}
121+
framework.L.Info().Msgf("Network %q already exists, ignoring", networkName)
118122
}
119123

120124
tonServices := []containerTemplate{

0 commit comments

Comments
 (0)