Files
query-orchestration/internal/server/server_test.go
T
Michael McGuinness 7da57058d4 Merged in bugfix/flakydb (pull request #21)
Bugfix/flakydb

* init

* fixenvvar

* fixtest
2025-01-14 17:28:26 +00:00

29 lines
485 B
Go

package server_test
import (
"context"
"os"
"path"
"queryorchestration/internal/server"
"queryorchestration/internal/test"
"testing"
"github.com/stretchr/testify/assert"
)
func TestNew(t *testing.T) {
ctx := context.Background()
_, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{
NoPool: true,
})
defer cleanup()
newCfg := &server.NewConfig{
BasePath: path.Join(os.Getenv("PWD"), "../.."),
}
cfg := server.New(ctx, newCfg)
assert.NotNil(t, cfg)
}