package test import ( "context" "testing" "github.com/stretchr/testify/assert" ) func TestCreateQueueContainer(t *testing.T) { ctx := context.Background() ncfg, ncleanup := CreateNetwork(t, ctx) defer ncleanup() dbcfg, dbcleanup := CreateDB(t, ctx, &CreateDatabaseConfig{ Network: ncfg, }) defer dbcleanup() qcfg, qcleanup := CreateQueue(t, ctx, &CreateQueueConfig{ Network: ncfg, }) defer qcleanup() extcfg := &queueConfig{ URL: qcfg.URL, Region: qcfg.External.Region, Endpoint: qcfg.External.Endpoint, Credentials: qcfg.External.Credentials, } cfg := &QueueContainerConfig{ ServiceName: "queryRunner", DB: dbcfg.External, Network: ncfg, Queue: extcfg, } cleanup := CreateQueueContainer(t, ctx, cfg) assert.NotNil(t, cleanup) cleanup() } func TestCreateQueueWithDependencies(t *testing.T) { ctx := context.Background() conn, cleanup := CreateQueueWithDependencies(t, ctx, "queryRunner") assert.NotNil(t, conn) assert.NotNil(t, cleanup) cleanup() }