Documentation ¶
Index ¶
- Constants
- func Addr(t *testing.T, assert *require.Assertions) netip.AddrPort
- func Context(t *testing.T) context.Context
- func Minio(ctx context.Context, t *testing.T, assert *require.Assertions, ...) string
- func Mod[T any](v T, f func(*T)) T
- func Namespace(t *testing.T) string
- func Postgres(ctx context.Context, t *testing.T, assert *require.Assertions) string
- func UnusedTCPPort(t *testing.T, assert *require.Assertions, host string) uint16
- func WaitTCPPort(ctx context.Context, addr string) error
Constants ¶
View Source
const ( MinioImage = `docker.io/bitnami/minio` MinioVersion = `2023` MinioDefaultEndpoint = `` MinioDefaultHost = `localhost` )
Default values for making nats test container.
View Source
const ( PostgresDBImage = `postgres` PostgresDBVersion = `16.1` PostgresDBDefaultEndpoint = `` )
Default values for making postgres test container.
View Source
const Host = `127.0.0.1`
Host is std test host.
View Source
const MaxTimeout = time.Second * 120
MaxTimeout for tests.
Variables ¶
This section is empty.
Functions ¶
func Minio ¶
func Minio( ctx context.Context, t *testing.T, assert *require.Assertions, accessKey, secretKey, sessionToken string, secure bool, region string, ) string
Minio build and run test container with file storage.
Notice:
- Starts Minio container;
- Make connections by credentials;
func Postgres ¶
Postgres build and run test container with database.
Notice:
- Starts postgres container.
func UnusedTCPPort ¶
UnusedTCPPort returns random unique unused TCP port at host.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.