Files
query-orchestration/api/queryAPI/testutils_test.go
T
Jay Brown 0ddae4f91e Merged in feature/remove-query (pull request #201)
remove query from codebase part 1

* remove query

* fix localstack run
2026-01-14 17:59:04 +00:00

67 lines
2.1 KiB
Go

package queryapi_test
import (
queryapi "queryorchestration/api/queryAPI"
"queryorchestration/internal/backgroundtask"
"queryorchestration/internal/client"
clientupdate "queryorchestration/internal/client/update"
"queryorchestration/internal/collector"
collectorset "queryorchestration/internal/collector/set"
"queryorchestration/internal/document"
documentbatch "queryorchestration/internal/document/batch"
documentupload "queryorchestration/internal/document/upload"
"queryorchestration/internal/export"
"queryorchestration/internal/fieldextraction"
"queryorchestration/internal/folder"
"queryorchestration/internal/label"
"queryorchestration/internal/server/api"
"queryorchestration/internal/serviceconfig/queue/clientsync"
)
// ControllerConfig provides test configuration for API controllers.
// Note: Query-related configurations have been removed. See remove_query_plan.md.
type ControllerConfig struct {
api.BaseConfig
clientsync.ClientSyncConfig
BackgroundRunner *backgroundtask.Runner
}
// GetBackgroundRunner returns the background runner for batch processing.
func (c *ControllerConfig) GetBackgroundRunner() *backgroundtask.Runner {
return c.BackgroundRunner
}
// createControllerServices creates a Services struct for testing.
// Note: Query-related services have been removed. See remove_query_plan.md.
func createControllerServices(cfg *ControllerConfig) *queryapi.Services {
exp := export.New()
col := collector.New(cfg)
colupdate := collectorset.New(cfg, &collectorset.Services{
Collector: col,
})
cli := client.New(cfg)
cliUpdate := clientupdate.New(cfg, &clientupdate.Services{
Client: cli,
})
doc := document.New(cfg)
docup := documentupload.New(cfg)
docbatch := documentbatch.New(cfg)
fieldext := fieldextraction.New(cfg)
fld := folder.New(cfg)
lbl := label.New(cfg)
return &queryapi.Services{
Export: exp,
Collector: col,
CollectorSet: colupdate,
Client: cli,
ClientUpdate: cliUpdate,
Document: doc,
DocumentUpload: docup,
DocumentBatch: docbatch,
FieldExtraction: fieldext,
Folder: fld,
Label: lbl,
}
}