Merged in feature/functestcov (pull request #84)
Function Test Coverage * test * scripts
This commit is contained in:
@@ -4,15 +4,14 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/testcontainers/testcontainers-go"
|
||||
"github.com/testcontainers/testcontainers-go/network"
|
||||
)
|
||||
|
||||
func CreateNetwork(t testing.TB, ctx context.Context) (*testcontainers.DockerNetwork, func()) {
|
||||
network, err := network.New(ctx, network.WithDriver("bridge"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
return network, func() {
|
||||
testcontainers.CleanupNetwork(t, network)
|
||||
|
||||
Reference in New Issue
Block a user