Documentation ¶
Index ¶
- Constants
- Variables
- func DynConf(env map[string]string) map[string]string
- func EnvExists(path string) bool
- func GetRedisCtlFromTestContext(tctx *TestContext, hostName string) (*helpers.RedisCtl, error)
- func InfraFromTestContext(tctx *TestContext) *helpers.Infra
- func MongoCtlFromTestContext(tctx *TestContext, host string) (*helpers.MongoCtl, error)
- func ReadEnv(path string) (map[string]string, error)
- func S3StorageFromTestContext(tctx *TestContext, host string) *helpers.S3Storage
- func SetupCommonSteps(ctx *godog.ScenarioContext, tctx *TestContext)
- func SetupMongodbBinaryBackupSteps(ctx *godog.ScenarioContext, tctx *TestContext)
- func SetupMongodbLogicalSteps(ctx *godog.ScenarioContext, tctx *TestContext)
- func SetupMongodbSteps(ctx *godog.ScenarioContext, tctx *TestContext)
- func SetupNewEnv(fromEnv map[string]string, envFilePath, stagingDir string) (map[string]string, error)
- func SetupRedisSteps(ctx *godog.ScenarioContext, tctx *TestContext)
- func SetupStaging(imagesDir, stagingDir string) error
- func WalgUtilFromTestContext(tctx *TestContext, host string) *helpers.WalgUtil
- type AuxData
- type MongoVersion
- type TestContext
- type TestingfWrap
Constants ¶
View Source
const ( EnvDirPerm os.FileMode = 0755 EnvFilePerv os.FileMode = 0644 )
View Source
const (
MAX_RETRIES_COUNT = 10
)
Variables ¶
View Source
var Env = map[string]string{
"IMAGES_DIR": "images",
"DOCKER_BRIDGE_NAME": "walg-func-test",
"DOCKER_IP4_SUBNET": "10.%s.0/24",
"DOCKER_IP6_SUBNET": "fd00:dead:beef:%s::/96",
"COMPOSE_FILE_SUFFIX": "-docker-compose.yml",
"TEST_ID": "13",
"TEST_CLEANUP_DELAY": "60",
"WALG_S3_PREFIX": "s3://dbaas/DBNAME-backup/test_uuid/test_DBNAME",
"WALG_CLIENT_PATH": "/usr/bin/wal-g",
"WALG_CONF_DIR": "/etc/wal-g",
"WALG_CONF_PATH": "/etc/wal-g/wal-g.json",
"S3_HOST": "minio01",
"S3_PORT": "9000",
"S3_BUCKET": "dbaas",
"S3_ACCESS_KEY": "S3_ACCESS_KEY",
"S3_SECRET_KEY": "S3_SECRET_KEY",
"EXPOSE_SSH_PORT": "22",
"BACKUP_BASE_TAG": "walg-func-test-base",
"BACKUP_BASE_PATH": "staging/images/base",
"MONGO_BUILD_PATH": ".",
"MONGO_ADMIN_USERNAME": "admin",
"MONGO_ADMIN_PASSWORD": "password",
"MONGO_ADMIN_DB_NAME": "admin",
"MONGO_EXPOSE_MONGOD": "27018",
"REDIS_EXPOSE_PORT": "6379",
"REDIS_PASSWORD": "password",
}
Functions ¶
func GetRedisCtlFromTestContext ¶
func GetRedisCtlFromTestContext(tctx *TestContext, hostName string) (*helpers.RedisCtl, error)
func InfraFromTestContext ¶
func InfraFromTestContext(tctx *TestContext) *helpers.Infra
func MongoCtlFromTestContext ¶
func MongoCtlFromTestContext(tctx *TestContext, host string) (*helpers.MongoCtl, error)
func S3StorageFromTestContext ¶
func S3StorageFromTestContext(tctx *TestContext, host string) *helpers.S3Storage
func SetupCommonSteps ¶
func SetupCommonSteps(ctx *godog.ScenarioContext, tctx *TestContext)
func SetupMongodbBinaryBackupSteps ¶
func SetupMongodbBinaryBackupSteps(ctx *godog.ScenarioContext, tctx *TestContext)
func SetupMongodbLogicalSteps ¶
func SetupMongodbLogicalSteps(ctx *godog.ScenarioContext, tctx *TestContext)
func SetupMongodbSteps ¶
func SetupMongodbSteps(ctx *godog.ScenarioContext, tctx *TestContext)
func SetupNewEnv ¶
func SetupRedisSteps ¶
func SetupRedisSteps(ctx *godog.ScenarioContext, tctx *TestContext)
func SetupStaging ¶
func WalgUtilFromTestContext ¶
func WalgUtilFromTestContext(tctx *TestContext, host string) *helpers.WalgUtil
Types ¶
type AuxData ¶
type AuxData struct { Timestamps map[string]helpers.OpTimestamp Snapshots map[string][]helpers.NsSnapshot CreatedBackupNames []string NometaBackupNames []string OplogPushEnabled bool }
type MongoVersion ¶
type TestContext ¶
type TestContext struct { EnvFilePath string Infra *helpers.Infra Env map[string]string Context context.Context AuxData AuxData Version MongoVersion PreviousBackupTime time.Time }
func CreateTestContex ¶
func CreateTestContex(database string) (tctx *TestContext, err error)
func (*TestContext) CleanEnv ¶
func (tctx *TestContext) CleanEnv() error
func (*TestContext) ContainerFQDN ¶
func (tctx *TestContext) ContainerFQDN(name string) string
func (*TestContext) LoadEnv ¶
func (tctx *TestContext) LoadEnv() (err error)
func (*TestContext) S3Host ¶
func (tctx *TestContext) S3Host() string
func (*TestContext) StopEnv ¶
func (tctx *TestContext) StopEnv() error
type TestingfWrap ¶
type TestingfWrap func(format string, args ...interface{})
func (TestingfWrap) Errorf ¶
func (tf TestingfWrap) Errorf(format string, args ...interface{})
Source Files ¶
Click to show internal directories.
Click to hide internal directories.