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,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/test"
|
||||
"testing"
|
||||
|
||||
@@ -14,15 +15,16 @@ import (
|
||||
func TestClient(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,
|
||||
RunMigrations: true,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
queries := cfg.DBQueries
|
||||
queries := cfg.GetDBQueries()
|
||||
|
||||
id, err := queries.CreateClient(ctx, "example_client")
|
||||
assert.NoError(t, err)
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"path"
|
||||
"queryorchestration/internal/database"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/test"
|
||||
"testing"
|
||||
|
||||
@@ -17,15 +18,16 @@ import (
|
||||
func TestCollector(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,
|
||||
RunMigrations: true,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
queries := cfg.DBQueries
|
||||
queries := cfg.GetDBQueries()
|
||||
|
||||
contextId, err := queries.CreateQuery(ctx, repository.QuerytypeContextFull)
|
||||
assert.NoError(t, err)
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/test"
|
||||
"testing"
|
||||
|
||||
@@ -14,15 +15,16 @@ import (
|
||||
func TestDocument(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,
|
||||
RunMigrations: true,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
queries := cfg.DBQueries
|
||||
queries := cfg.GetDBQueries()
|
||||
|
||||
clientId, err := queries.CreateClient(ctx, "example_client")
|
||||
assert.NoError(t, err)
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/test"
|
||||
"testing"
|
||||
|
||||
@@ -14,15 +15,16 @@ import (
|
||||
func TestJob(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,
|
||||
RunMigrations: true,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
queries := cfg.DBQueries
|
||||
queries := cfg.GetDBQueries()
|
||||
|
||||
clientId, err := queries.CreateClient(ctx, "example_client")
|
||||
assert.NoError(t, err)
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"path"
|
||||
"queryorchestration/internal/database"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/test"
|
||||
"testing"
|
||||
|
||||
@@ -17,15 +18,16 @@ import (
|
||||
func TestQueries(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,
|
||||
RunMigrations: true,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
queries := cfg.DBQueries
|
||||
queries := cfg.GetDBQueries()
|
||||
|
||||
contextQueryID, err := queries.CreateQuery(ctx, repository.Querytype(repository.QuerytypeContextFull))
|
||||
assert.NoError(t, err)
|
||||
@@ -164,15 +166,16 @@ func TestQueries(t *testing.T) {
|
||||
func TestQueryDependencyTree(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,
|
||||
RunMigrations: true,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
queries := cfg.DBQueries
|
||||
queries := cfg.GetDBQueries()
|
||||
|
||||
contextQueryID, err := queries.CreateQuery(ctx, repository.Querytype(repository.QuerytypeContextFull))
|
||||
assert.NoError(t, err)
|
||||
@@ -234,15 +237,16 @@ func TestQueryDependencyTree(t *testing.T) {
|
||||
func TestQueriesList(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,
|
||||
RunMigrations: true,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
queries := cfg.DBQueries
|
||||
queries := cfg.GetDBQueries()
|
||||
|
||||
contextQueryID, err := queries.CreateQuery(ctx, repository.Querytype(repository.QuerytypeContextFull))
|
||||
assert.NoError(t, err)
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/test"
|
||||
"testing"
|
||||
|
||||
@@ -15,15 +16,16 @@ import (
|
||||
func TestResults(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,
|
||||
RunMigrations: true,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
queries := cfg.DBQueries
|
||||
queries := cfg.GetDBQueries()
|
||||
|
||||
jsonQueryID, err := queries.CreateQuery(ctx, repository.Querytype(repository.QuerytypeJsonExtractor))
|
||||
assert.NoError(t, err)
|
||||
@@ -73,15 +75,16 @@ func TestResults(t *testing.T) {
|
||||
func TestResultValues(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,
|
||||
RunMigrations: true,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
queries := cfg.DBQueries
|
||||
queries := cfg.GetDBQueries()
|
||||
|
||||
jsonQueryID, err := queries.CreateQuery(ctx, repository.Querytype(repository.QuerytypeJsonExtractor))
|
||||
assert.NoError(t, err)
|
||||
@@ -170,15 +173,16 @@ func TestResultValues(t *testing.T) {
|
||||
func TestUnsyncedQueries(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,
|
||||
RunMigrations: true,
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
queries := cfg.DBQueries
|
||||
queries := cfg.GetDBQueries()
|
||||
|
||||
clientId, err := queries.CreateClient(ctx, "example_client")
|
||||
assert.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user