Documentation
¶
Index ¶
- Variables
- func BuildCMKImage(t *testing.T) string
- func GroupsExists(ctx context.Context, t require.TestingT, tenantID string, ...)
- func MissingFiles(t *testing.T, requiredFiles []string) bool
- func NamespaceExists(database *multitenancy.DB, tenantName string) (bool, error)
- func NoopPluginConfigs() []plugincatalog.PluginConfig
- func RegisterNoopPlugins(registry catalog.BuiltInPluginRegistry)
- func RunCMKService(t *testing.T, svcCfg ServiceConfig, cfg *config.Config) testcontainers.Container
- func TableInTenantSchemaExist(database *multitenancy.DB, tenantName string, tableName string) (bool, error)
- func TenantExists(t require.TestingT, multitenancydb *multitenancy.DB, ...)
- func TenantExistsInPublicSchema(database *multitenancy.DB, tenantName string) (bool, error)
- func TenantSchemaExists(database *multitenancy.DB, tenantName string) (bool, error)
- type Service
- type ServiceConfig
- type TableInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var DB = config.Database{ Host: commoncfg.SourceRef{ Source: commoncfg.EmbeddedSourceValue, Value: "localhost", }, User: commoncfg.SourceRef{ Source: commoncfg.EmbeddedSourceValue, Value: "admin", }, Secret: commoncfg.SourceRef{ Source: commoncfg.EmbeddedSourceValue, Value: "password", }, Name: "mydb", Port: "5432", }
View Source
var MessageService = config.Redis{ Host: commoncfg.SourceRef{ Source: commoncfg.EmbeddedSourceValue, Value: "localhost", }, ACL: config.RedisACL{ Enabled: true, Password: commoncfg.SourceRef{ Source: commoncfg.EmbeddedSourceValue, Value: "secret", }, Username: commoncfg.SourceRef{ Source: commoncfg.EmbeddedSourceValue, Value: "default", }, }, Port: "6379", SecretRef: commoncfg.SecretRef{ Type: commoncfg.InsecureSecretType, }, }
Functions ¶
func BuildCMKImage ¶ added in v0.9.0
BuildCMKImage runs makefile step docker-dev-build to build the image This is only needed as there is a bug with testcontainers and docker buildkit
func GroupsExists ¶
func NamespaceExists ¶
func NamespaceExists(database *multitenancy.DB, tenantName string) (bool, error)
func NoopPluginConfigs ¶ added in v0.9.0
func NoopPluginConfigs() []plugincatalog.PluginConfig
func RegisterNoopPlugins ¶ added in v0.9.0
func RegisterNoopPlugins(registry catalog.BuiltInPluginRegistry)
func RunCMKService ¶ added in v0.9.0
func RunCMKService(t *testing.T, svcCfg ServiceConfig, cfg *config.Config) testcontainers.Container
RunCMKService builds image and starts a testcontainer with the provided service This might take some time if there isn't an image built, but it has caching mechanisms Returns the container so you can execute commands or interact with it
func TenantExists ¶
func TenantExists(t require.TestingT, multitenancydb *multitenancy.DB, schemaName, tableName string)
func TenantExistsInPublicSchema ¶
func TenantExistsInPublicSchema(database *multitenancy.DB, tenantName string) (bool, error)
func TenantSchemaExists ¶
func TenantSchemaExists(database *multitenancy.DB, tenantName string) (bool, error)
Types ¶
type Service ¶ added in v0.9.0
type Service string
const ( ApiServer Service = "/bin/api-server" TaskWorker Service = "/bin/task-worker" TaskScheduler Service = "/bin/task-scheduler" TaskCLI Service = "/bin/task-cli" TenantManager Service = "/bin/tenant-manager" TenantManagerCLI Service = "/bin/tenant-manager-cli" EventReconciler Service = "/bin/event-reconciler" DBMigrator Service = "/bin/db-migrator" )
type ServiceConfig ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.