Files
query-orchestration/test/queryRunner/queryrunner_test.go
T
Michael McGuinness 0ac5ff9e15 Merged in feature/testquery (pull request #39)
Test Query

* depstextandclean

* startedcleaningresult

* resulttidyup

* roundone

* cleaning

* unsyncedquery

* startedtestsandsimplification

* api

* querytests

* resultprocessortests

* unittests

* cleanup
2025-01-29 11:52:37 +00:00

39 lines
848 B
Go

package integration_test
import (
"context"
"encoding/json"
"queryorchestration/internal/query"
"queryorchestration/internal/server/queue"
"queryorchestration/internal/test"
"testing"
"github.com/aws/aws-sdk-go-v2/service/sqs/types"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
)
func TestQueryRunner(t *testing.T) {
ctx := context.Background()
qCfg, cleanup := test.CreateQueueWithDependencies(t, ctx, "queryRunner")
defer cleanup()
document := query.Document{
ID: uuid.New(),
JobID: uuid.New(),
CleanVersion: int32(1),
TextVersion: int32(1),
}
docJson, err := json.Marshal(document)
assert.Nil(t, err)
cfg := &queue.Config{
URL: qCfg.URL,
Client: qCfg.Client,
}
err = queue.Send(ctx, cfg, string(docJson), map[string]types.MessageAttributeValue{})
assert.Nil(t, err)
}