Files
query-orchestration/internal/server/server_test.go
T

27 lines
467 B
Go
Raw Normal View History

2025-01-10 11:12:03 +00:00
package server_test
import (
"context"
2025-01-14 17:28:26 +00:00
"os"
"path"
2025-01-10 11:12:03 +00:00
"queryorchestration/internal/server"
"queryorchestration/internal/test"
2025-01-10 11:12:03 +00:00
"testing"
"github.com/stretchr/testify/assert"
)
func TestNew(t *testing.T) {
ctx := context.Background()
_, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{})
2025-01-10 11:12:03 +00:00
defer cleanup()
newCfg := &server.NewConfig{
2025-01-14 17:28:26 +00:00
BasePath: path.Join(os.Getenv("PWD"), "../.."),
2025-01-10 11:12:03 +00:00
}
cfg := server.New(ctx, newCfg)
assert.NotNil(t, cfg)
}