cbd1d5f067
Add tests for queuing * startingtest * queuerunnertest * addedtestfuncs * testtests * passintegration * unittests
21 lines
422 B
Go
21 lines
422 B
Go
package test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/testcontainers/testcontainers-go"
|
|
"github.com/testcontainers/testcontainers-go/network"
|
|
)
|
|
|
|
func CreateNetwork(t *testing.T, ctx context.Context) (*testcontainers.DockerNetwork, func()) {
|
|
network, err := network.New(ctx, network.WithDriver("bridge"))
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
return network, func() {
|
|
testcontainers.CleanupNetwork(t, network)
|
|
}
|
|
}
|