integrationutils

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

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

func BuildCMKImage(t *testing.T) string

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 GroupsExists(ctx context.Context, t require.TestingT, tenantID string, multitenancydb *multitenancy.DB)

func MissingFiles

func MissingFiles(t *testing.T, requiredFiles []string) bool

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 TableInTenantSchemaExist

func TableInTenantSchemaExist(database *multitenancy.DB, tenantName string,
	tableName string,
) (bool, error)

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

type ServiceConfig struct {
	Service Service
	Name    string
	Args    []string
}

type TableInfo

type TableInfo struct {
	Schema string `gorm:"column:table_schema"`
	Name   string `gorm:"column:table_name"`
}

func (TableInfo) TableName

func (TableInfo) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL