Merged in feature/standardisefilepath (pull request #111)
Feature/standardisefilepath * baseprocessing * generalstructure
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"queryorchestration/internal/document"
|
||||
documentinit "queryorchestration/internal/document/init"
|
||||
"queryorchestration/internal/server/runner"
|
||||
"queryorchestration/internal/serviceconfig/objectstore"
|
||||
"queryorchestration/internal/serviceconfig/queue/documentsync"
|
||||
queuemock "queryorchestration/mocks/queue"
|
||||
|
||||
@@ -47,7 +48,11 @@ func TestDocInitRunner(t *testing.T) {
|
||||
t.Run("valid", func(t *testing.T) {
|
||||
clientId := "clientid"
|
||||
bucketName := "bucketName"
|
||||
location := fmt.Sprintf("%s/import/aaa", clientId)
|
||||
location := objectstore.BucketKey{
|
||||
Location: objectstore.Import,
|
||||
ClientID: clientId,
|
||||
Filename: "aaa",
|
||||
}
|
||||
docinfo := document.DocumentSummary{
|
||||
ID: uuid.New(),
|
||||
ClientID: "hello",
|
||||
@@ -55,7 +60,7 @@ func TestDocInitRunner(t *testing.T) {
|
||||
}
|
||||
doc := docinitrunner.Body{
|
||||
Bucket: bucketName,
|
||||
Key: location,
|
||||
Key: location.String(),
|
||||
Hash: docinfo.Hash,
|
||||
ClientID: clientId,
|
||||
}
|
||||
@@ -69,7 +74,7 @@ func TestDocInitRunner(t *testing.T) {
|
||||
pgxmock.NewRows([]string{"id"}).
|
||||
AddRow(docinfo.ID),
|
||||
)
|
||||
pool.ExpectExec("name: AddDocumentEntry :exec").WithArgs(docinfo.ID, bucketName, location).
|
||||
pool.ExpectExec("name: AddDocumentEntry :exec").WithArgs(docinfo.ID, bucketName, location.String()).
|
||||
WillReturnResult(pgxmock.NewResult("", 1))
|
||||
pool.ExpectCommit()
|
||||
pool.ExpectQuery("name: GetDocumentSummary :one").WithArgs(docinfo.ID).
|
||||
|
||||
Reference in New Issue
Block a user