Merged in feature/postprocessing (pull request #114)
Feature/postprocessing * tests * passtest * fixshorttests * mosttests * improvingbasedockerfile * testspeeds * testing * host * canparallel * clean * passfullsuite * singlepagemax * test * findfeatures * findstables * tbls * tablestoo * tablestoo * lateraltests * tableloc * cleanup * inlinetable * childids * cleanup * tests
This commit is contained in:
+22
-11
@@ -65,6 +65,13 @@ func TestProcess(t *testing.T) {
|
||||
|
||||
queryapitest.WaitForClientStatus(t, ctx, net.Client, client.Id, queryapi.INSYNC)
|
||||
|
||||
textractBody := "Hello World"
|
||||
textractExpectation := test.CreateDetectDocumentTextExpectation(
|
||||
t,
|
||||
net.Dependencies.MockServer,
|
||||
textractBody,
|
||||
)
|
||||
|
||||
part := uint16(0)
|
||||
importKey := objectstore.BucketKey{
|
||||
ClientID: client.Id,
|
||||
@@ -73,24 +80,28 @@ func TestProcess(t *testing.T) {
|
||||
CreatedAt: time.Now().UTC(),
|
||||
Part: &part,
|
||||
}
|
||||
expectation := test.CreateStartDocTextDetectionExpectation(t, net.Dependencies.MockServer, test.StartDocTextDetectionExpectationParams{
|
||||
Bucket: net.Dependencies.BucketName,
|
||||
JobID: "textractId",
|
||||
Key: importKey,
|
||||
})
|
||||
|
||||
body := strings.NewReader(pdfHelloWorld)
|
||||
inputFile := strings.NewReader(pdfHelloWorld)
|
||||
test.PutObject(t, ctx, cfg, test.PutObjectParams{
|
||||
Bucket: net.Dependencies.BucketName,
|
||||
File: body,
|
||||
File: inputFile,
|
||||
Key: importKey,
|
||||
})
|
||||
|
||||
queryapitest.WaitForClientStatus(t, ctx, net.Client, client.Id, queryapi.NOTSYNCED)
|
||||
|
||||
test.WaitForMockTextractOutput(t, ctx, cfg, net.Dependencies.MockServer, test.TextractOutputParams{
|
||||
Request: expectation.Request,
|
||||
File: body,
|
||||
test.WaitForMockEndpoint(t, net.Dependencies.MockServer, textractExpectation.Request)
|
||||
textKey := objectstore.BucketKey{
|
||||
ClientID: client.Id,
|
||||
EntityID: uuid.New(),
|
||||
Location: objectstore.Text,
|
||||
CreatedAt: time.Now().UTC(),
|
||||
Part: &part,
|
||||
}
|
||||
inputFile = strings.NewReader(textractBody)
|
||||
test.PutObject(t, ctx, cfg, test.PutObjectParams{
|
||||
Bucket: net.Dependencies.BucketName,
|
||||
File: inputFile,
|
||||
Key: textKey,
|
||||
})
|
||||
|
||||
queryapitest.WaitForClientStatus(t, ctx, net.Client, client.Id, queryapi.INSYNC)
|
||||
|
||||
Reference in New Issue
Block a user