Documentation
¶
Index ¶
- Constants
- Variables
- type CustomerHandlerTestSuite
- func (s *CustomerHandlerTestSuite) TestCreate(ctx context.Context, t *testing.T)
- func (s *CustomerHandlerTestSuite) TestDelete(ctx context.Context, t *testing.T)
- func (s *CustomerHandlerTestSuite) TestGet(ctx context.Context, t *testing.T)
- func (s *CustomerHandlerTestSuite) TestList(ctx context.Context, t *testing.T)
- func (s *CustomerHandlerTestSuite) TestUpdate(ctx context.Context, t *testing.T)
- func (s *CustomerHandlerTestSuite) TestUpdateWithSubscriptionPresent(ctx context.Context, t *testing.T)
- type TestEnv
Constants ¶
View Source
const (
DefaultPostgresHost = "127.0.0.1"
)
View Source
const (
PostgresURLTemplate = "postgres://postgres:postgres@%s:5432/postgres?sslmode=disable"
)
Variables ¶
View Source
var ( TestKey = "test-customer" TestName = "Test Customer" TestPrimaryEmail = "test@openmeter.io" TestCurrency = currencyx.Code("USD") TestAddressCountry = models.CountryCode("US") TestAddressCity = "San Francisco" TestAddressState = "CA" TestAddressPostalCode = "94105" TestAddressLine1 = "123 Main St" TestAddressLine2 = "Apt 1" TestAddressPhoneNumber = "123-456-7890" TestAddress = models.Address{ Country: &TestAddressCountry, City: &TestAddressCity, Line1: &TestAddressLine1, Line2: &TestAddressLine2, PostalCode: &TestAddressPostalCode, PhoneNumber: &TestAddressPhoneNumber, } TestSubjectKeys = []string{"subject-0"} )
Functions ¶
This section is empty.
Types ¶
type CustomerHandlerTestSuite ¶
type CustomerHandlerTestSuite struct {
Env TestEnv
// contains filtered or unexported fields
}
func (*CustomerHandlerTestSuite) TestCreate ¶
func (s *CustomerHandlerTestSuite) TestCreate(ctx context.Context, t *testing.T)
TestCreate tests the creation of a customer
func (*CustomerHandlerTestSuite) TestDelete ¶
func (s *CustomerHandlerTestSuite) TestDelete(ctx context.Context, t *testing.T)
TestDelete tests the deletion of a customer
func (*CustomerHandlerTestSuite) TestGet ¶
func (s *CustomerHandlerTestSuite) TestGet(ctx context.Context, t *testing.T)
TestGet tests the getting of a customer by ID
func (*CustomerHandlerTestSuite) TestList ¶
func (s *CustomerHandlerTestSuite) TestList(ctx context.Context, t *testing.T)
TestList tests the listing of customers
func (*CustomerHandlerTestSuite) TestUpdate ¶
func (s *CustomerHandlerTestSuite) TestUpdate(ctx context.Context, t *testing.T)
TestUpdate tests the updating of a customer
func (*CustomerHandlerTestSuite) TestUpdateWithSubscriptionPresent ¶
func (s *CustomerHandlerTestSuite) TestUpdateWithSubscriptionPresent(ctx context.Context, t *testing.T)
If a customer has a subscription, UsageAttributions cannot be updated
Click to show internal directories.
Click to hide internal directories.