Documentation
¶
Index ¶
- func AssertAfter(t *testing.T, db *dynamodb.DynamoDB, table string, ...) bool
- func NewClientV1(t *testing.T) (*sessionv1.Session, *dynamodbv1.DynamoDB, string)
- func NewLocalstackSession() *sessionv1.Session
- func NewTestTableName(t *testing.T) string
- func SetContent(t *testing.T, db *dynamodb.DynamoDB, table string, ...)
- type DynamodbTestContext
- func (d *DynamodbTestContext) EqualContent(ctx context.Context, wantItems []map[string]types.AttributeValue) (bool, error)
- func (d *DynamodbTestContext) Got(ctx context.Context) ([]map[string]types.AttributeValue, error)
- func (d *DynamodbTestContext) Must(err error)
- func (d *DynamodbTestContext) MustBool(value bool, err error) bool
- func (d *DynamodbTestContext) Subtest(t *testing.T) *DynamodbTestContext
- func (d *DynamodbTestContext) WithDbContent(ctx context.Context, entries []map[string]types.AttributeValue) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertAfter ¶
func NewClientV1 ¶ added in v1.5.18
NewClientV1 generate AWS session, DynamoDB client, and a table name that will be deleted at the end of the function.
func NewLocalstackSession ¶
func NewTestTableName ¶
func SetContent ¶
Types ¶
type DynamodbTestContext ¶ added in v1.5.19
type DynamodbTestContext struct { T *testing.T Ctx context.Context Cfg aws.Config Client *dynamodb.Client Table string }
func NewTestContext ¶ added in v1.5.19
func NewTestContext(ctx context.Context, t *testing.T) *DynamodbTestContext
func (*DynamodbTestContext) EqualContent ¶ added in v1.5.19
func (d *DynamodbTestContext) EqualContent(ctx context.Context, wantItems []map[string]types.AttributeValue) (bool, error)
func (*DynamodbTestContext) Got ¶ added in v1.5.19
func (d *DynamodbTestContext) Got(ctx context.Context) ([]map[string]types.AttributeValue, error)
func (*DynamodbTestContext) Must ¶ added in v1.5.19
func (d *DynamodbTestContext) Must(err error)
func (*DynamodbTestContext) MustBool ¶ added in v1.5.19
func (d *DynamodbTestContext) MustBool(value bool, err error) bool
func (*DynamodbTestContext) Subtest ¶ added in v1.5.19
func (d *DynamodbTestContext) Subtest(t *testing.T) *DynamodbTestContext
func (*DynamodbTestContext) WithDbContent ¶ added in v1.5.19
func (d *DynamodbTestContext) WithDbContent(ctx context.Context, entries []map[string]types.AttributeValue) error
Click to show internal directories.
Click to hide internal directories.