92334ad1dd
Set Up S3 integration * cfginterfaceandfirsts3funcs * addlocalstack * generallypassesfullsuite * addedmultipleattemptedpings * cleanup * stabiliseplusskip
42 lines
857 B
Go
42 lines
857 B
Go
package integration_test
|
|
|
|
import (
|
|
"context"
|
|
"queryorchestration/internal/query"
|
|
"queryorchestration/internal/serviceconfig"
|
|
"queryorchestration/internal/serviceconfig/queue"
|
|
"queryorchestration/internal/test"
|
|
"testing"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestQueryRunner(t *testing.T) {
|
|
ctx := context.Background()
|
|
|
|
cfg := &serviceconfig.BaseConfig{}
|
|
test.SetCfgProvider(t, cfg)
|
|
|
|
c, cleanup := test.CreateRunnerNetwork(t, ctx, &test.RunnerNetworkConfig{
|
|
Cfg: cfg,
|
|
Name: test.QueryRunner,
|
|
})
|
|
defer cleanup()
|
|
|
|
document := query.Document{
|
|
ID: uuid.New(),
|
|
JobID: uuid.New(),
|
|
CleanVersion: int32(1),
|
|
TextVersion: int32(1),
|
|
}
|
|
|
|
err := cfg.SendToQueue(ctx, &queue.SendParams{
|
|
QueueURL: c.URI,
|
|
Body: document,
|
|
})
|
|
assert.NoError(t, err)
|
|
|
|
// TODO - check document output
|
|
}
|