Files
query-orchestration/internal/server/server_test.go
T
Michael McGuinness fa95d733ca Merged in feature/shorttestsanddirtidy (pull request #26)
Add short tests and Tidy internal directories

* complete the tasks
2025-01-17 12:00:32 +00:00

30 lines
537 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) {
if testing.Short() {
t.Skip("Skipping long test in short mode")
}
ctx := context.Background()
_, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{})
defer cleanup()
newCfg := &server.NewConfig{
BasePath: path.Join(os.Getenv("PWD"), "../.."),
}
cfg := server.New(ctx, newCfg)
assert.NotNil(t, cfg)
}