Merged in feature/docinitialisation (pull request #41)
Queuing Changes and Cfg Testing * staarting * staarting * startedpush * note * save * mocking * removederrs * fixtests * cleanuperrs * newenvsetup * preppingtests * queue * mmovetocfgpassunittests * sortoutconfig * passinginteg * deps * fixtests
This commit is contained in:
@@ -2,7 +2,6 @@ package integration_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"queryorchestration/internal/query"
|
||||
"queryorchestration/internal/server/queue"
|
||||
"queryorchestration/internal/test"
|
||||
@@ -16,7 +15,12 @@ import (
|
||||
func TestQueryRunner(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
||||
qCfg, cleanup := test.CreateQueueWithDependencies(t, ctx, "queryRunner")
|
||||
cfg := test.CreateBaseConfig()
|
||||
|
||||
c, cleanup := test.CreateRunnerNetwork(t, ctx, &test.RunnerNetworkConfig{
|
||||
Cfg: cfg,
|
||||
Name: test.QueryRunner,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
document := query.Document{
|
||||
@@ -25,14 +29,13 @@ func TestQueryRunner(t *testing.T) {
|
||||
CleanVersion: int32(1),
|
||||
TextVersion: int32(1),
|
||||
}
|
||||
docJson, err := json.Marshal(document)
|
||||
assert.Nil(t, err)
|
||||
|
||||
cfg := &queue.Config{
|
||||
URL: qCfg.URL,
|
||||
Client: qCfg.Client,
|
||||
qcfg := &queue.Config{
|
||||
URL: c.URI,
|
||||
Client: cfg.QueueClient,
|
||||
}
|
||||
|
||||
err = queue.Send(ctx, cfg, string(docJson), map[string]types.MessageAttributeValue{})
|
||||
assert.Nil(t, err)
|
||||
err := queue.Send(ctx, qcfg, document, map[string]types.MessageAttributeValue{})
|
||||
assert.NoError(t, err)
|
||||
|
||||
// TODO - check document output
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user