Files
commerce/test/models/wallet/suite_test.go
zeekay 1943f1c093 Hanzo Commerce
Multi-tenant commerce and billing: orders, subscriptions, invoices, plans,
usage metering and a credit ledger. One Go binary. MIT OR Apache-2.0.

Claude-Session: https://claude.ai/code/session_01SAtaDFm8VDiWrhYHNNtxMw
2026-09-23 21:52:16 -07:00

45 lines
897 B
Go

package test
import (
"testing"
"github.com/hanzoai/commerce/datastore"
"github.com/hanzoai/commerce/models/fixtures"
"github.com/hanzoai/commerce/util/nscontext"
"github.com/hanzoai/commerce/util/test/ae"
"github.com/hanzoai/commerce/util/zipctx"
. "github.com/hanzoai/commerce/util/test/ginkgo"
)
func Test(t *testing.T) {
Setup("models/mixin", t)
}
var (
ctx ae.Context
db *datastore.Datastore
bcDb *datastore.Datastore
)
// Setup test context
var _ = BeforeSuite(func() {
ctx = ae.NewContext()
c := zipctx.New(ctx)
// Create the suchtees org and namespace for realism
fixtures.Organization(c)
// Create dbs for the two namespaces
nsCtx := nscontext.WithNamespace(ctx, "suchtees")
db = datastore.New(nsCtx)
nsCtx = nscontext.WithNamespace(ctx, "_blockchains")
bcDb = datastore.New(nsCtx)
})
// Tear-down test context
var _ = AfterSuite(func() {
ctx.Close()
})