Documentation
¶
Index ¶
- Constants
- func RandomFreePort() (int, error)
- type CephAccessConfig
- type CephRGWTemplateValues
- type ComponentCreationConfig
- func AsCeph(opts ...ComponentOption) ComponentCreationConfig
- func AsGarage(opts ...ComponentOption) ComponentCreationConfig
- func AsGoFakeS3(opts ...ComponentOption) ComponentCreationConfig
- func AsKeystone(opts ...ComponentOption) ComponentCreationConfig
- func AsMiniRedis(opts ...ComponentOption) ComponentCreationConfig
- func AsMinio(opts ...ComponentOption) ComponentCreationConfig
- func AsRedis(opts ...ComponentOption) ComponentCreationConfig
- func AsSeaweedFS(opts ...ComponentOption) ComponentCreationConfig
- func AsSwift(keystoneInstance string, opts ...ComponentOption) ComponentCreationConfig
- type ComponentOption
- type ContainerHost
- type ContainerLogConsumer
- type ContainerPort
- type GarageAccessConfig
- type GarageConfigTemplateValues
- type GoFakeS3AccessConfig
- type KeystoneAccessConfig
- type MiniRedisAccessConfig
- type MinioAccessConfig
- type RedisAccessConfig
- type SeaweedFSAccessConfig
- type SeaweedFSS3ConfigTemplateValues
- type StorageKeystoneAccessConfig
- type SwiftAccessConfig
- type SwiftProxyConfigTemplateValues
- type Terminator
- type TestEnvironment
- func (r *TestEnvironment) GetCephAccessConfig(instanceName string) (*CephAccessConfig, error)
- func (r *TestEnvironment) GetGarageAccessConfig(instanceName string) (*GarageAccessConfig, error)
- func (r *TestEnvironment) GetGoFakeS3AccessConfig(instanceName string) (*GoFakeS3AccessConfig, error)
- func (r *TestEnvironment) GetKeystoneAccessConfig(instanceName string) (*KeystoneAccessConfig, error)
- func (r *TestEnvironment) GetMiniRedisAccessConfig(instanceName string) (*MiniRedisAccessConfig, error)
- func (r *TestEnvironment) GetMinioAccessConfig(instanceName string) (*MinioAccessConfig, error)
- func (r *TestEnvironment) GetRedisAccessConfig(instanceName string) (*RedisAccessConfig, error)
- func (r *TestEnvironment) GetSeaweedFSAccessConfig(instanceName string) (*SeaweedFSAccessConfig, error)
- func (r *TestEnvironment) GetSwiftAccessConfig(instanceName string) (*SwiftAccessConfig, error)
- func (r *TestEnvironment) Terminate(ctx context.Context) error
Constants ¶
View Source
const ( CRedisImage = "redis:8.4.0-alpine" CRedisPort = 6379 CRedisPassword = "password" CKeystoneImage = "ghcr.io/aiivashchenko/docker-keystone:28.0.0" CKeystoneExternalPort = 5000 CKeystoneAdminPort = 35357 CKeystoneAdminUsername = "admin" CKeystoneAdminPassword = "password" CKeystoneAdminDomainName = "Default" CKeystoneAdminTenantName = "admin" CkeystoneAdminRoleName = "admin" CKeystoneObjectStoreServiceType = "object-store" CKeystoneServiceProjectName = "service" CKeystoneSwiftServiceName = "swift" CKeystoneSwiftUsername = "swift" CKeystoneSwiftPassword = "swiftpass" CKeystoneSwiftEndpointName = "swift" CKeystoneSwiftEndpointURLTemplate = "http://%s:%d/v1/AUTH_$(tenant_id)s" CKeystoneSwiftOperatorRole = "swift-operator" CKeystoneSwiftResellerRole = "swift-reseller" CKeystoneCephUsername = "ceph" CKeystoneCephPassword = "cephpass" CKeystoneCephServiceName = "ceph" CKeystoneCephEndpointName = "ceph" CKeystoneCephEndpointURLTemplate = "http://%s:%d/swift/v1/AUTH_$(tenant_id)s" CKeystoneCephOperatorRole = "ceph-operator" CKeystoneCephResellerRole = "ceph-reseller" CGoFakeS3EC2AccessToken = "a7f1e798b7c2417cba4a02de97dc3cdc" CGoFakeS3EC2SecretToken = "18f4f6761ada4e3795fa5273c30349b9" CSwiftImage = "ghcr.io/aiivashchenko/docker-swift:2.37.0" CSwiftPort = 8080 CMinioImage = "minio/minio:RELEASE.2025-09-07T16-13-09Z-cpuv1" CMinioUsername = "minioadmin" CMinioPassword = "minioadmin" CMinioS3Port = 9000 CMinioManagementPort = 9001 CGarageImage = "dxflrs/garage:v1.0.1" CGarageReplicationFactor = 1 CGarageRPCSecret = "d90f9a1e0d5c4a5d8f1b7c3e6a2d4b8f0c1e3a5d7b9f2c4e6a8d0b1f3c5e7a9d" CGarageS3Port = 3900 CGarageRPCPort = 3901 CGarageAdminPort = 3903 CGarageRegion = "garage" CGarageZone = "dc1" CGarageKeyPermPath = "/v1/key" CGarageCapacityBytes = 1_000_000_000 CGarageKeyName = "chorus" CGarageAccessToken = "GK0123456789abcdef01234567" CGarageSecretToken = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" CGarageAdminToken = "garage-admin-token" CGarageConfigPath = "/etc/garage.toml" CSeaweedFSImage = "chrislusf/seaweedfs:3.80" CSeaweedFSS3Port = 8333 CSeaweedFSMasterPort = 9333 CSeaweedFSFilerPort = 8888 CSeaweedFSIdentityName = "chorus" CSeaweedFSAccessToken = "seaweedfsaccesskey" CSeaweedFSSecretToken = "seaweedfssecretkey" CSeaweedFSS3ConfigPath = "/etc/seaweedfs/s3.json" CCephImage = "ghcr.io/arttor/ceph-test:v19" CCephDemoUID = "cephuid" CCephSystemUserUID = "superuser" CCephSystemUserDisplayName = "superuser" CCephSystemUserAccessToken = "superuser" CCephSystemUserSecretToken = "superuser" CCephAPIPort = 8080 CContainerStopDeadline = 10 * time.Second CNATPortTemplate = "%d/tcp" )
Variables ¶
This section is empty.
Functions ¶
func RandomFreePort ¶ added in v0.6.0
Types ¶
type CephAccessConfig ¶
type CephAccessConfig struct {
Keystone StorageKeystoneAccessConfig
Host ContainerHost
SystemUser string
SystemPassword string
Port ContainerPort
}
type CephRGWTemplateValues ¶
type ComponentCreationConfig ¶
type ComponentCreationConfig struct {
InstantiateFunc func(context.Context, *TestEnvironment, string, *ComponentCreationConfig) error
Dependencies []string
DisabledLogs []string
HostAccessPorts []int
Container bool
}
func AsCeph ¶
func AsCeph(opts ...ComponentOption) ComponentCreationConfig
func AsGarage ¶ added in v0.7.9
func AsGarage(opts ...ComponentOption) ComponentCreationConfig
func AsGoFakeS3 ¶ added in v0.6.0
func AsGoFakeS3(opts ...ComponentOption) ComponentCreationConfig
func AsKeystone ¶
func AsKeystone(opts ...ComponentOption) ComponentCreationConfig
func AsMiniRedis ¶ added in v0.6.0
func AsMiniRedis(opts ...ComponentOption) ComponentCreationConfig
func AsMinio ¶
func AsMinio(opts ...ComponentOption) ComponentCreationConfig
func AsRedis ¶
func AsRedis(opts ...ComponentOption) ComponentCreationConfig
func AsSeaweedFS ¶ added in v0.7.9
func AsSeaweedFS(opts ...ComponentOption) ComponentCreationConfig
func AsSwift ¶
func AsSwift(keystoneInstance string, opts ...ComponentOption) ComponentCreationConfig
type ComponentOption ¶
type ComponentOption interface {
// contains filtered or unexported methods
}
ComponentOption interface to support Functional options for test-containers.
func WithDisabledSTDErrLog ¶
func WithDisabledSTDErrLog() ComponentOption
WithDisabledSTDErrLog disables STDERR logs for the container.
func WithDisabledSTDOutLog ¶
func WithDisabledSTDOutLog() ComponentOption
WithDisabledSTDOutLog disables STDOUT logs for the container.
func WithHostAccessPorts ¶ added in v0.7.2
func WithHostAccessPorts(ports ...int) ComponentOption
func WithKeystone ¶ added in v0.7.0
func WithKeystone(instanceName string) ComponentOption
type ContainerHost ¶
type ContainerLogConsumer ¶
type ContainerLogConsumer struct {
// contains filtered or unexported fields
}
func NewContainerLogConsumer ¶
func NewContainerLogConsumer(componenetName string, disabled []string) *ContainerLogConsumer
func (*ContainerLogConsumer) Accept ¶
func (r *ContainerLogConsumer) Accept(l testcontainers.Log)
type ContainerPort ¶
type GarageAccessConfig ¶ added in v0.7.9
type GarageAccessConfig struct {
Host ContainerHost
Region string
AccessToken string
SecretToken string
AdminToken string
S3Port ContainerPort
AdminPort ContainerPort
}
type GarageConfigTemplateValues ¶ added in v0.7.9
type GoFakeS3AccessConfig ¶ added in v0.6.0
type KeystoneAccessConfig ¶
type KeystoneAccessConfig struct {
DefaultDomain *domains.Domain
ServiceProject *projects.Project
Host ContainerHost
User string
Password string
TenantName string
ExternalPort ContainerPort
AdminPort ContainerPort
}
type MiniRedisAccessConfig ¶ added in v0.6.0
type MinioAccessConfig ¶
type MinioAccessConfig struct {
Host ContainerHost
User string
Password string
S3Port ContainerPort
ManagementPort ContainerPort
}
type RedisAccessConfig ¶
type RedisAccessConfig struct {
Host ContainerHost
Password string
Port ContainerPort
}
type SeaweedFSAccessConfig ¶ added in v0.7.9
type SeaweedFSAccessConfig struct {
Host ContainerHost
AccessToken string
SecretToken string
S3Port ContainerPort
MasterPort ContainerPort
}
type SeaweedFSS3ConfigTemplateValues ¶ added in v0.7.9
type SwiftAccessConfig ¶
type SwiftAccessConfig struct {
Keystone StorageKeystoneAccessConfig
Host ContainerHost
Port ContainerPort
}
type Terminator ¶ added in v0.6.0
type TestEnvironment ¶
type TestEnvironment struct {
// contains filtered or unexported fields
}
func NewTestEnvironment ¶
func NewTestEnvironment(ctx context.Context, envConfig map[string]ComponentCreationConfig) (*TestEnvironment, error)
func (*TestEnvironment) GetCephAccessConfig ¶
func (r *TestEnvironment) GetCephAccessConfig(instanceName string) (*CephAccessConfig, error)
func (*TestEnvironment) GetGarageAccessConfig ¶ added in v0.7.9
func (r *TestEnvironment) GetGarageAccessConfig(instanceName string) (*GarageAccessConfig, error)
func (*TestEnvironment) GetGoFakeS3AccessConfig ¶ added in v0.6.0
func (r *TestEnvironment) GetGoFakeS3AccessConfig(instanceName string) (*GoFakeS3AccessConfig, error)
func (*TestEnvironment) GetKeystoneAccessConfig ¶
func (r *TestEnvironment) GetKeystoneAccessConfig(instanceName string) (*KeystoneAccessConfig, error)
func (*TestEnvironment) GetMiniRedisAccessConfig ¶ added in v0.6.0
func (r *TestEnvironment) GetMiniRedisAccessConfig(instanceName string) (*MiniRedisAccessConfig, error)
func (*TestEnvironment) GetMinioAccessConfig ¶
func (r *TestEnvironment) GetMinioAccessConfig(instanceName string) (*MinioAccessConfig, error)
func (*TestEnvironment) GetRedisAccessConfig ¶
func (r *TestEnvironment) GetRedisAccessConfig(instanceName string) (*RedisAccessConfig, error)
func (*TestEnvironment) GetSeaweedFSAccessConfig ¶ added in v0.7.9
func (r *TestEnvironment) GetSeaweedFSAccessConfig(instanceName string) (*SeaweedFSAccessConfig, error)
func (*TestEnvironment) GetSwiftAccessConfig ¶
func (r *TestEnvironment) GetSwiftAccessConfig(instanceName string) (*SwiftAccessConfig, error)
Click to show internal directories.
Click to hide internal directories.