+1
-22
@@ -1,10 +1,8 @@
|
||||
package endtoend_test
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/serviceconfig/aws"
|
||||
@@ -14,7 +12,6 @@ import (
|
||||
queryapitest "queryorchestration/internal/test/queryAPI"
|
||||
queryapi "queryorchestration/pkg/queryAPI"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -75,21 +72,6 @@ func TestProcess(t *testing.T) {
|
||||
wg.Wait()
|
||||
|
||||
test.WaitForMockEndpoint(t, net.Dependencies.MockServer, textractExpectation.Request)
|
||||
|
||||
part := uint16(0)
|
||||
textKey := objectstore.BucketKey{
|
||||
ClientID: clientId,
|
||||
EntityID: uuid.New(),
|
||||
Location: objectstore.Text,
|
||||
CreatedAt: time.Now().UTC(),
|
||||
Part: &part,
|
||||
}
|
||||
inputFile := strings.NewReader(textractBody)
|
||||
test.PutObject(t, t.Context(), cfg, test.PutObjectParams{
|
||||
File: inputFile,
|
||||
Key: textKey,
|
||||
})
|
||||
|
||||
queryapitest.WaitForClientStatus(t, t.Context(), net.Client, clientId, queryapi.INSYNC)
|
||||
|
||||
docs, err := net.Client.ListDocumentsByClientIdWithResponse(t.Context(), clientId)
|
||||
@@ -110,8 +92,7 @@ func TestProcess(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, docRes)
|
||||
require.NotNil(t, docRes.JSON200)
|
||||
fullDoc := *docRes.JSON200
|
||||
assert.EqualExportedValues(t, expectedDoc, fullDoc)
|
||||
assert.EqualExportedValues(t, expectedDoc, *docRes.JSON200)
|
||||
})
|
||||
t.Run("update config", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
@@ -162,7 +143,6 @@ func TestProcess(t *testing.T) {
|
||||
wg.Wait()
|
||||
|
||||
test.WaitForMockEndpoint(t, net.Dependencies.MockServer, textractExpectation.Request)
|
||||
|
||||
queryapitest.WaitForClientStatus(t, t.Context(), net.Client, clientId, queryapi.INSYNC)
|
||||
|
||||
jcfg := `{"path":"keytwo"}`
|
||||
@@ -251,7 +231,6 @@ func TestProcess(t *testing.T) {
|
||||
wg.Wait()
|
||||
|
||||
test.WaitForMockEndpoint(t, net.Dependencies.MockServer, textractExpectation.Request)
|
||||
|
||||
queryapitest.WaitForClientStatus(t, t.Context(), net.Client, clientId, queryapi.INSYNC)
|
||||
|
||||
docs, err := net.Client.ListDocumentsByClientIdWithResponse(t.Context(), clientId)
|
||||
|
||||
Reference in New Issue
Block a user