7001ca854c
Queuing Changes and Cfg Testing * staarting * staarting * startedpush * note * save * mocking * removederrs * fixtests * cleanuperrs * newenvsetup * preppingtests * queue * mmovetocfgpassunittests * sortoutconfig * passinginteg * deps * fixtests
47 lines
796 B
Go
47 lines
796 B
Go
package test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestCreateRunner(t *testing.T) {
|
|
if testing.Short() {
|
|
t.Skip("Skipping long test in short mode")
|
|
}
|
|
ctx := context.Background()
|
|
|
|
ncfg, ncleanup := CreateNetwork(t, ctx)
|
|
defer ncleanup()
|
|
|
|
cfg := CreateBaseConfig()
|
|
|
|
qcleanup := CreateQueueClient(t, ctx, &CreateQueueConfig{
|
|
Network: ncfg,
|
|
Cfg: cfg,
|
|
})
|
|
defer qcleanup()
|
|
url := CreateQueue(t, ctx, cfg, "myname")
|
|
|
|
_, dbcleanup := CreateDB(t, ctx, &CreateDatabaseConfig{
|
|
Network: ncfg,
|
|
Cfg: cfg,
|
|
})
|
|
defer dbcleanup()
|
|
|
|
qccfg := &RunnerConfig{
|
|
Name: QueryRunner,
|
|
Cfg: cfg,
|
|
Network: ncfg,
|
|
QueueURL: url,
|
|
}
|
|
|
|
c, cleanup := CreateRunner(t, ctx, qccfg)
|
|
assert.NotNil(t, cleanup)
|
|
assert.NotNil(t, c)
|
|
|
|
cleanup()
|
|
}
|