Files
query-orchestration/internal/test/objectstore_test.go
T
Michael McGuinness 0815cb35fb Merged in feature/lint (pull request #87)
Basic Lint Checks

* basic
2025-03-05 12:05:46 +00:00

54 lines
1.0 KiB
Go

package test
import (
"context"
"testing"
"queryorchestration/internal/serviceconfig"
objectstore "queryorchestration/internal/serviceconfig/objectstore"
"github.com/stretchr/testify/assert"
)
type StoreConfig struct {
serviceconfig.BaseConfig
objectstore.ObjectStoreConfig
}
func TestCreateBucket(t *testing.T) {
if testing.Short() {
t.Skip("Skipping long test in short mode")
}
ctx := context.Background()
cfg := &StoreConfig{}
SetCfgProvider(t, cfg)
acfg, cleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{
Cfg: cfg,
})
defer cleanup()
CreateStoreClient(t, ctx, cfg, acfg.ExternalEndpoint)
CreateBucket(t, ctx, cfg, "myname")
}
func TestCreateStoreClient(t *testing.T) {
if testing.Short() {
t.Skip("Skipping long test in short mode")
}
ctx := context.Background()
cfg := &StoreConfig{}
SetCfgProvider(t, cfg)
acfg, cleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{
Cfg: cfg,
})
defer cleanup()
CreateStoreClient(t, ctx, cfg, acfg.ExternalEndpoint)
assert.NotNil(t, cfg.GetStoreClient())
}