Documentation
¶
Index ¶
- Constants
- 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 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 Command
- type Service
- type ServiceConfig
- type TableInfo
Constants ¶
View Source
const ( Cmkd Service = "/bin/cmkd" Cmkctl Service = "/bin/cmkctl" APIServer Command = "api-server" TenantManager Command = "tenant-manager" EventProcessor Command = "event-processor" TaskWorker Command = "task-woker" TaskScheduler Command = "task-scheduler" DBMigrator Command = "db-migrator" TaskCLI Command = "task" )
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 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 ServiceConfig ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.