Files
query-orchestration/internal/test/runner_test.go
T
Michael McGuinness 92334ad1dd Merged in feature/s3integration (pull request #47)
Set Up S3 integration

* cfginterfaceandfirsts3funcs

* addlocalstack

* generallypassesfullsuite

* addedmultipleattemptedpings

* cleanup

* stabiliseplusskip
2025-02-05 12:52:41 +00:00

51 lines
932 B
Go

package test
import (
"context"
"queryorchestration/internal/serviceconfig"
"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 := &serviceconfig.BaseConfig{}
SetCfgProvider(t, cfg)
_, qcleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{
Network: ncfg,
Cfg: cfg,
})
defer qcleanup()
err := cfg.SetQueueClient(ctx)
assert.NoError(t, err)
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()
}