Merged in feature/s3integration (pull request #47)
Set Up S3 integration * cfginterfaceandfirsts3funcs * addlocalstack * generallypassesfullsuite * addedmultipleattemptedpings * cleanup * stabiliseplusskip
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"queryorchestration/internal/database/migrations"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/serviceconfig/database"
|
||||
"queryorchestration/internal/test"
|
||||
"testing"
|
||||
|
||||
@@ -17,8 +19,9 @@ func TestRunMigrations(t *testing.T) {
|
||||
}
|
||||
ctx := context.Background()
|
||||
|
||||
cfg := test.CreateBaseConfig()
|
||||
cfg.BasePath = path.Join(os.Getenv("PWD"), "../../..")
|
||||
cfg := &serviceconfig.BaseConfig{}
|
||||
test.SetCfgProvider(t, cfg)
|
||||
cfg.SetBasePath(path.Join(os.Getenv("PWD"), "../../.."))
|
||||
|
||||
_, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{
|
||||
Cfg: cfg,
|
||||
@@ -32,14 +35,17 @@ func TestRunMigrations(t *testing.T) {
|
||||
func TestRunMigrationsNoDB(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
||||
cfg := test.CreateBaseConfig()
|
||||
cfg.BasePath = path.Join(os.Getenv("PWD"), "../../..")
|
||||
cfg.DBUser = "invalid_user"
|
||||
cfg.DBSecret = "invalid_pass"
|
||||
cfg.DBHost = "invalid_host"
|
||||
cfg.DBPort = 5432
|
||||
cfg.DBName = "invalid_name"
|
||||
cfg.DBNoSSL = true
|
||||
cfg := &serviceconfig.BaseConfig{}
|
||||
test.SetCfgProvider(t, cfg)
|
||||
cfg.SetBasePath(path.Join(os.Getenv("PWD"), "../../.."))
|
||||
cfg.SetDBConfig(&database.DBConfig{
|
||||
DBUser: "invalid_user",
|
||||
DBSecret: "invalid_pass",
|
||||
DBHost: "invalid_host",
|
||||
DBPort: 5432,
|
||||
DBName: "invalid_name",
|
||||
DBNoSSL: true,
|
||||
})
|
||||
|
||||
err := migrations.Run(ctx, cfg)
|
||||
assert.Error(t, err)
|
||||
|
||||
Reference in New Issue
Block a user