Merged in feature/textextract (pull request #108)
Start adding Textract + UUID changes * base * startclient * ts * short * tests
This commit is contained in:
@@ -2,8 +2,6 @@ package test_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
@@ -23,7 +21,6 @@ func TestCreateAPI(t *testing.T) {
|
||||
|
||||
cfg := &serviceconfig.BaseConfig{}
|
||||
test.SetCfgProvider(t, cfg)
|
||||
cfg.SetBasePath(path.Join(os.Getenv("PWD"), "../.."))
|
||||
_, dbcleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{
|
||||
Network: ncfg,
|
||||
Cfg: cfg,
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"queryorchestration/internal/database/migrations"
|
||||
db "queryorchestration/internal/database"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/serviceconfig/database"
|
||||
|
||||
@@ -94,7 +94,7 @@ func CreateDB(t testing.TB, ctx context.Context, cfg *CreateDatabaseConfig) (tes
|
||||
cfg.Cfg.SetDBConfig(dbcfg)
|
||||
|
||||
if cfg.RunMigrations {
|
||||
err := migrations.Run(ctx, cfg.Cfg)
|
||||
err := db.RunMigrations(ctx, cfg.Cfg)
|
||||
require.NoError(t, err)
|
||||
|
||||
err = cfg.Cfg.SetDBPool(ctx)
|
||||
|
||||
@@ -2,8 +2,6 @@ package test_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
@@ -20,7 +18,6 @@ func TestCreateDB(t *testing.T) {
|
||||
|
||||
cfg := &serviceconfig.BaseConfig{}
|
||||
test.SetCfgProvider(t, cfg)
|
||||
cfg.SetBasePath(path.Join(os.Getenv("PWD"), "../.."))
|
||||
|
||||
dbcfg, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{Cfg: cfg})
|
||||
assert.NotNil(t, dbcfg)
|
||||
@@ -38,7 +35,6 @@ func TestCreateDBWithMigrations(t *testing.T) {
|
||||
|
||||
cfg := &serviceconfig.BaseConfig{}
|
||||
test.SetCfgProvider(t, cfg)
|
||||
cfg.SetBasePath(path.Join(os.Getenv("PWD"), "../.."))
|
||||
|
||||
dbcfg, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{
|
||||
Cfg: cfg,
|
||||
|
||||
@@ -2,8 +2,6 @@ package test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
@@ -121,12 +119,6 @@ func CreateFullDependencies(t testing.TB, ctx context.Context, cfg FullDependenc
|
||||
}
|
||||
}
|
||||
|
||||
func SetCfgProviderWithBasePath(t testing.TB, cfg serviceconfig.ConfigProvider, basePath string) {
|
||||
SetCfgProvider(t, cfg)
|
||||
|
||||
cfg.SetBasePath(path.Join(os.Getenv("PWD"), basePath))
|
||||
}
|
||||
|
||||
func SetCfgProvider(t testing.TB, cfg serviceconfig.ConfigProvider) {
|
||||
cfg.SetAWSConfig(&aws.AWSConfig{
|
||||
AWSKeyID: "test",
|
||||
|
||||
@@ -51,7 +51,7 @@ func TestCreateFullDependencies(t *testing.T) {
|
||||
}
|
||||
ctx := context.Background()
|
||||
cfg := &FullDepsConfig{}
|
||||
SetCfgProviderWithBasePath(t, cfg, "../..")
|
||||
SetCfgProvider(t, cfg)
|
||||
|
||||
conn, cleanup := CreateFullDependencies(t, ctx, cfg)
|
||||
|
||||
@@ -67,7 +67,7 @@ func TestCreateNetwork(t *testing.T) {
|
||||
}
|
||||
ctx := context.Background()
|
||||
cfg := &FullDepsConfig{}
|
||||
SetCfgProviderWithBasePath(t, cfg, "../..")
|
||||
SetCfgProvider(t, cfg)
|
||||
|
||||
conn, cleanup := CreateFullNetwork(t, ctx, cfg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user