Documentation ¶
Index ¶
- Constants
- func CleanupKV(ctx context.Context, t *testing.T, store kv.Store)
- func GetDB(t testing.TB, uri string, opts ...GetDBOption) (db.Database, string)
- func GetDBInstance(pool *dockertest.Pool) (string, func())
- func GetDynamoDBInstance() (string, func(), error)
- func GetDynamoDBProd(ctx context.Context, tb testing.TB) kv.Store
- func MigrateBadEntry(_ context.Context, _ *pgxpool.Pool, writer io.Writer) error
- func MigrateBasic(_ context.Context, _ *pgxpool.Pool, writer io.Writer) error
- func MigrateEmpty(_ context.Context, _ *pgxpool.Pool, _ io.Writer) error
- func MigrateNoHeader(_ context.Context, _ *pgxpool.Pool, writer io.Writer) error
- func MigrateParallel(_ context.Context, _ *pgxpool.Pool, writer io.Writer) error
- func Must(t testing.TB, err error)
- func MustDo(t testing.TB, what string, err error)
- func NewBlockAdapterByType(t testing.TB, translator block.UploadIDTranslator, blockstoreType string) block.Adapter
- func NewClientFromCreds(logger logging.Logger, accessKeyID string, secretAccessKey string, ...) (*api.ClientWithResponses, error)
- func ParseEndpointURL(logger logging.Logger, endpointURL string) string
- func RandomRune(rand *rand.Rand, num, den int) rune
- func RandomString(rand *rand.Rand, size int) string
- func SetupTestingEnv(params *SetupTestingEnvParams) (logging.Logger, api.ClientWithResponsesInterface, *s3.S3)
- func UniqueKVTableName() string
- func ValidateKV(ctx context.Context, t *testing.T, store kv.Store, entries int)
- type GetDBOption
- type GetDBOptions
- type SetupTestingEnvParams
- type UploadIDTranslator
Constants ¶
View Source
const ( DBContainerTimeoutSeconds = 60 * 30 // 30 minutes EnvKeyUseBlockAdapter = "USE_BLOCK_ADAPTER" )
View Source
const ( DynamodbLocalPort = "6432" DynamodbLocalURI = "http://localhost:6432" DynamoDBReadCapacity = 1000 DynamoDBWriteCapacity = 1000 DynamoDBScanLimit = 10 )
Variables ¶
This section is empty.
Functions ¶
func GetDBInstance ¶
func GetDBInstance(pool *dockertest.Pool) (string, func())
func GetDynamoDBInstance ¶ added in v0.68.0
func GetDynamoDBProd ¶ added in v0.68.0
func MigrateBadEntry ¶ added in v0.66.0
func MigrateBasic ¶ added in v0.66.0
func MigrateEmpty ¶ added in v0.66.0
func MigrateNoHeader ¶ added in v0.66.0
func MigrateParallel ¶ added in v0.66.0
func NewBlockAdapterByType ¶
func NewClientFromCreds ¶ added in v0.43.0
func NewClientFromCreds(logger logging.Logger, accessKeyID string, secretAccessKey string, endpointURL string) (*api.ClientWithResponses, error)
Creates a client using the credentials of a user
func ParseEndpointURL ¶ added in v0.43.0
Parses the given endpoint string
func RandomRune ¶ added in v0.51.0
RandomRune returns a random Unicode rune from rand, weighting at least num out of den runes to be ASCII.
func RandomString ¶ added in v0.51.0
RandomString returns a random UTF-8 string of size or almost size bytes from rand. It is weighted towards using many ASCII characters.
func SetupTestingEnv ¶
func SetupTestingEnv(params *SetupTestingEnvParams) (logging.Logger, api.ClientWithResponsesInterface, *s3.S3)
func UniqueKVTableName ¶ added in v0.68.0
func UniqueKVTableName() string
Types ¶
type GetDBOption ¶
type GetDBOption func(options *GetDBOptions)
func WithGetDBApplyDDL ¶
func WithGetDBApplyDDL(apply bool) GetDBOption
type GetDBOptions ¶
type GetDBOptions struct {
ApplyDDL bool
}
type SetupTestingEnvParams ¶
type UploadIDTranslator ¶
type UploadIDTranslator struct { T *testing.T TransMap map[string]string ExpectedID string // contains filtered or unexported fields }
func (*UploadIDTranslator) RemoveUploadID ¶
func (d *UploadIDTranslator) RemoveUploadID(inputUploadID string)
func (*UploadIDTranslator) SetUploadID ¶
func (d *UploadIDTranslator) SetUploadID(uploadID string) string
func (*UploadIDTranslator) TranslateUploadID ¶
func (d *UploadIDTranslator) TranslateUploadID(simulationID string) string
Click to show internal directories.
Click to hide internal directories.