Merged in feature/momocks (pull request #150)
Decrease Mocks * feature/nomocks * nonet * assertsaws * assert
This commit is contained in:
@@ -6,9 +6,6 @@ import (
|
||||
|
||||
queryapi "queryorchestration/api/queryAPI"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/document"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/serviceconfig/queue/clientsync"
|
||||
"queryorchestration/internal/test"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -17,16 +14,11 @@ import (
|
||||
|
||||
func TestListDocumentsByClientId(t *testing.T) {
|
||||
t.Parallel()
|
||||
cfg := &struct {
|
||||
serviceconfig.BaseConfig
|
||||
clientsync.ClientSyncConfig
|
||||
}{}
|
||||
net := test.GetNetwork(t)
|
||||
test.CreateDB(t, cfg, net, &test.CreateDatabaseConfig{})
|
||||
cfg := &ControllerConfig{}
|
||||
test.CreateDB(t, cfg)
|
||||
|
||||
cons := queryapi.NewControllers(&queryapi.Services{
|
||||
Document: document.New(cfg),
|
||||
})
|
||||
svc := createControllerServices(cfg)
|
||||
cons := queryapi.NewControllers(svc)
|
||||
|
||||
err := cfg.GetDBQueries().CreateClient(t.Context(), &repository.CreateClientParams{
|
||||
Clientid: "client_id",
|
||||
@@ -54,16 +46,11 @@ func TestListDocumentsByClientId(t *testing.T) {
|
||||
|
||||
func TestGetDocument(t *testing.T) {
|
||||
t.Parallel()
|
||||
cfg := &struct {
|
||||
serviceconfig.BaseConfig
|
||||
clientsync.ClientSyncConfig
|
||||
}{}
|
||||
net := test.GetNetwork(t)
|
||||
test.CreateDB(t, cfg, net, &test.CreateDatabaseConfig{})
|
||||
cfg := &ControllerConfig{}
|
||||
test.CreateDB(t, cfg)
|
||||
|
||||
cons := queryapi.NewControllers(&queryapi.Services{
|
||||
Document: document.New(cfg),
|
||||
})
|
||||
svc := createControllerServices(cfg)
|
||||
cons := queryapi.NewControllers(svc)
|
||||
|
||||
err := cfg.GetDBQueries().CreateClient(t.Context(), &repository.CreateClientParams{
|
||||
Clientid: "client_id",
|
||||
|
||||
Reference in New Issue
Block a user