Documentation ¶
Index ¶
- Constants
- func GetDBInstance(pool *dockertest.Pool) (string, func())
- func GetDynamoDBInstance() (string, func(), error)
- func GetDynamoDBProd(ctx context.Context, tb testing.TB) kv.Store
- func Must(t testing.TB, err error)
- func MustDo(t testing.TB, what string, err error)
- func NewBlockAdapterByType(t testing.TB, 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 PingPG(ctx context.Context, pool *pgxpool.Pool) error
- func RandomRune(rand *rand.Rand, num, den int) rune
- func RandomString(rand *rand.Rand, size int) string
- func SetupTestS3Client(endpoint, key, secret string) *s3.S3
- func SetupTestingEnv(params *SetupTestingEnvParams) (logging.Logger, api.ClientWithResponsesInterface, *s3.S3, string)
- func UniqueKVTableName() string
- func WithEnvironmentVariable(t *testing.T, k, v string)
- type GetDBOption
- type GetDBOptions
- type SetupTestingEnvParams
Constants ¶
View Source
const ( DBName = "lakefs_db" DBContainerTimeoutSeconds = 60 * 30 // 30 minutes EnvKeyUseBlockAdapter = "USE_BLOCK_ADAPTER" // pragma: allowlist secret )
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 NewBlockAdapterByType ¶
func NewClientFromCreds ¶ added in v0.43.0
func NewClientFromCreds(logger logging.Logger, accessKeyID string, secretAccessKey string, endpointURL string) (*api.ClientWithResponses, error)
NewClientFromCreds creates a client using the credentials of a user
func ParseEndpointURL ¶ added in v0.43.0
ParseEndpointURL 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 SetupTestS3Client ¶ added in v0.82.0
func SetupTestingEnv ¶
func SetupTestingEnv(params *SetupTestingEnvParams) (logging.Logger, api.ClientWithResponsesInterface, *s3.S3, string)
func UniqueKVTableName ¶ added in v0.68.0
func UniqueKVTableName() string
func WithEnvironmentVariable ¶ added in v0.87.0
WithEnvironmentVariable Sets an environment variable for the duration of the test,
restoring it to a previous value, if any, at teardown.
Warning: Environment variables affect other goroutines that might be running at the same time -
so this function is *not* thread safe.
Types ¶
type GetDBOption ¶
type GetDBOption func(options *GetDBOptions)
type GetDBOptions ¶
type GetDBOptions struct {
ApplyDDL bool
}
Click to show internal directories.
Click to hide internal directories.