Merged in feature/s3integration (pull request #47)
Set Up S3 integration * cfginterfaceandfirsts3funcs * addlocalstack * generallypassesfullsuite * addedmultipleattemptedpings * cleanup * stabiliseplusskip
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"os"
|
||||
"path"
|
||||
"queryorchestration/internal/server"
|
||||
"queryorchestration/internal/test"
|
||||
queuemock "queryorchestration/mocks/queue"
|
||||
runnermock "queryorchestration/mocks/runner"
|
||||
@@ -21,17 +20,16 @@ func TestNew(t *testing.T) {
|
||||
t.Skip("Skipping long test in short mode")
|
||||
}
|
||||
ctx := context.Background()
|
||||
sccfg := test.CreateBaseConfig()
|
||||
sccfg.BasePath = path.Join(os.Getenv("PWD"), "../../..")
|
||||
cfg := &BaseConfig{
|
||||
BaseConfig: server.BaseConfig{
|
||||
BaseConfig: *sccfg,
|
||||
},
|
||||
}
|
||||
qcleanup := test.CreateQueueClient(t, ctx, &test.CreateQueueConfig{
|
||||
Cfg: &cfg.BaseConfig.BaseConfig,
|
||||
cfg := &BaseConfig{}
|
||||
test.SetCfgProvider(t, cfg)
|
||||
cfg.SetBasePath(path.Join(os.Getenv("PWD"), "../../.."))
|
||||
|
||||
_, acleanup := test.CreateAWSContainer(t, ctx, &test.CreateAWSConfig{
|
||||
Cfg: cfg,
|
||||
})
|
||||
defer qcleanup()
|
||||
defer acleanup()
|
||||
err := cfg.SetQueueClient(ctx)
|
||||
assert.NoError(t, err)
|
||||
_, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{
|
||||
Cfg: cfg,
|
||||
})
|
||||
@@ -43,7 +41,7 @@ func TestNew(t *testing.T) {
|
||||
cfg.ControllerFunc = func() Controller {
|
||||
return runnermock.NewMockController(t)
|
||||
}
|
||||
cfg.QueueURL = test.CreateQueue(t, ctx, &cfg.BaseConfig.BaseConfig, "queueName")
|
||||
cfg.QueueURL = test.CreateQueue(t, ctx, cfg, "queueName")
|
||||
|
||||
srvPtr, err := New(ctx, cfg)
|
||||
assert.NotNil(t, srvPtr)
|
||||
|
||||
@@ -18,11 +18,9 @@ func TestNew(t *testing.T) {
|
||||
}
|
||||
ctx := context.Background()
|
||||
|
||||
sccfg := test.CreateBaseConfig()
|
||||
sccfg.BasePath = path.Join(os.Getenv("PWD"), "../..")
|
||||
cfg := &server.BaseConfig{
|
||||
BaseConfig: *sccfg,
|
||||
}
|
||||
cfg := &server.BaseConfig{}
|
||||
test.SetCfgProvider(t, cfg)
|
||||
cfg.SetBasePath(path.Join(os.Getenv("PWD"), "../.."))
|
||||
|
||||
_, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{
|
||||
Cfg: cfg,
|
||||
|
||||
@@ -4,8 +4,6 @@ import (
|
||||
"context"
|
||||
"os"
|
||||
"path"
|
||||
"queryorchestration/internal/server"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
|
||||
"queryorchestration/internal/test"
|
||||
"testing"
|
||||
@@ -21,13 +19,9 @@ func TestNew(t *testing.T) {
|
||||
}
|
||||
ctx := context.Background()
|
||||
|
||||
sccfg := test.CreateBaseConfig()
|
||||
sccfg.BasePath = path.Join(os.Getenv("PWD"), "../../..")
|
||||
cfg := &BaseConfig{
|
||||
BaseConfig: server.BaseConfig{
|
||||
BaseConfig: *sccfg,
|
||||
},
|
||||
}
|
||||
cfg := &BaseConfig{}
|
||||
test.SetCfgProvider(t, cfg)
|
||||
cfg.SetBasePath(path.Join(os.Getenv("PWD"), "../../.."))
|
||||
_, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{
|
||||
Cfg: cfg,
|
||||
})
|
||||
@@ -37,11 +31,9 @@ func TestNew(t *testing.T) {
|
||||
return nil, nil
|
||||
}
|
||||
cfg.RegisterHandlersFunc = registerHandlers
|
||||
errInitializingConfig := serviceconfig.InitializeConfig(cfg)
|
||||
assert.NoError(t, errInitializingConfig)
|
||||
|
||||
serverInstance, errCreatingServer := New(ctx, cfg)
|
||||
assert.NoError(t, errCreatingServer)
|
||||
serverInstance, err := New(ctx, cfg)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 8080, serverInstance.port)
|
||||
assert.Equal(t, "0.0.0.0", serverInstance.host)
|
||||
assert.Equal(t, "0.0.0.0:8080", serverInstance.address)
|
||||
|
||||
Reference in New Issue
Block a user