Documentation
¶
Index ¶
- Constants
- func ConvertInterfaceToAny(jsonData []byte) (*anypb.Any, error)
- func GetActionsFromValues(standardActions *string, customActions *string) []*policy.Action
- func GetProjectDir() (string, error)
- func LogComposeService(ctx context.Context, container *tcb.DockerContainer, logger *slog.Logger, ...)
- func LogComposeServices(c interface{}, logger *slog.Logger)
- func NewPlatformCukesContext(cukesContext PlatformTestSuiteContext) context.Context
- func RegisterAttributeStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
- func RegisterAuthorizationStepDefinitions(ctx *godog.ScenarioContext)
- func RegisterDirectEntitlementsStepDefinitions(ctx *godog.ScenarioContext)
- func RegisterDynamicValueMappingsStepDefinitions(ctx *godog.ScenarioContext)
- func RegisterERSStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
- func RegisterEncryptionStepDefinitions(ctx *godog.ScenarioContext)
- func RegisterKasRegistryStepDefinitions(ctx *godog.ScenarioContext)
- func RegisterLDAPStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
- func RegisterLocalPlatformStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
- func RegisterNamespaceStepDefinitions(ctx *godog.ScenarioContext)
- func RegisterObligationsStepDefinitions(ctx *godog.ScenarioContext, _ *PlatformTestSuiteContext)
- func RegisterRegisteredResourcesStepDefinitions(ctx *godog.ScenarioContext)
- func RegisterResourceMappingScaleSteps(ctx *godog.ScenarioContext)
- func RegisterSmokeStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
- func RegisterSubjectMappingsStepsDefinitions(ctx *godog.ScenarioContext)
- type AttributesStepDefinitions
- type AuthorizationServiceStepDefinitions
- type DirectEntitlementsStepDefinitions
- type DockerComposeLogger
- type DynamicValueMappingsStepDefinitions
- type ERSInlineConfig
- type ERSMappingStrategyConfig
- type ERSProviderConfig
- type ERSStepDefinitions
- type EncryptionStepDefinitions
- type KasRegistryStepDefinitions
- type LDAPStepDefinitions
- type LocalDevOptions
- type LocalDevPlatformGlue
- type LocalDevScenarioOptions
- type LocalPlatformStepDefinitions
- type NamespacesStepDefinitions
- type ObligationsStepDefinitions
- type PlatformCukesHelper
- type PlatformGlue
- type PlatformScenarioContext
- func (c *PlatformScenarioContext) ClearError()
- func (c *PlatformScenarioContext) GetAttributeValue(ctx context.Context, fqn string) (*policy.Value, error)
- func (c *PlatformScenarioContext) GetError() error
- func (c *PlatformScenarioContext) GetObject(key string) any
- func (c *PlatformScenarioContext) RecordObject(key string, obj any)
- func (c *PlatformScenarioContext) RegisterPlatformShutdownHook(hook func() error)
- func (c *PlatformScenarioContext) RegisterShutdownHook(hook func() error)
- func (c *PlatformScenarioContext) SetError(err error)
- type PlatformTestSuiteContext
- type RegisteredResourcesStepDefinitions
- type SmokeStepDefinitions
- type SubjectMappingsStepDefinitions
Constants ¶
const StatelessTag = "@stateless"
Variables ¶
This section is empty.
Functions ¶
func GetActionsFromValues ¶
func GetProjectDir ¶
func LogComposeService ¶
func LogComposeService(ctx context.Context, container *tcb.DockerContainer, logger *slog.Logger, svc string)
LogComposeService logs to `logger` all log statements for a docker container
func LogComposeServices ¶
LogComposeServices logs to `logger` all log statements for each service within the DockerStack instance 'c'
func NewPlatformCukesContext ¶
func NewPlatformCukesContext(cukesContext PlatformTestSuiteContext) context.Context
NewPlatformCukesContext creates a context with a PlatformTestSuiteContext struct value using the contextKey
func RegisterAttributeStepDefinitions ¶
func RegisterAttributeStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
func RegisterAuthorizationStepDefinitions ¶
func RegisterAuthorizationStepDefinitions(ctx *godog.ScenarioContext)
func RegisterDirectEntitlementsStepDefinitions ¶
func RegisterDirectEntitlementsStepDefinitions(ctx *godog.ScenarioContext)
func RegisterDynamicValueMappingsStepDefinitions ¶
func RegisterDynamicValueMappingsStepDefinitions(ctx *godog.ScenarioContext)
func RegisterERSStepDefinitions ¶
func RegisterERSStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
func RegisterEncryptionStepDefinitions ¶
func RegisterEncryptionStepDefinitions(ctx *godog.ScenarioContext)
func RegisterKasRegistryStepDefinitions ¶
func RegisterKasRegistryStepDefinitions(ctx *godog.ScenarioContext)
func RegisterLDAPStepDefinitions ¶
func RegisterLDAPStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
func RegisterLocalPlatformStepDefinitions ¶
func RegisterLocalPlatformStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
func RegisterNamespaceStepDefinitions ¶
func RegisterNamespaceStepDefinitions(ctx *godog.ScenarioContext)
func RegisterObligationsStepDefinitions ¶
func RegisterObligationsStepDefinitions(ctx *godog.ScenarioContext, _ *PlatformTestSuiteContext)
func RegisterRegisteredResourcesStepDefinitions ¶
func RegisterRegisteredResourcesStepDefinitions(ctx *godog.ScenarioContext)
func RegisterResourceMappingScaleSteps ¶
func RegisterResourceMappingScaleSteps(ctx *godog.ScenarioContext)
func RegisterSmokeStepDefinitions ¶
func RegisterSmokeStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
func RegisterSubjectMappingsStepsDefinitions ¶
func RegisterSubjectMappingsStepsDefinitions(ctx *godog.ScenarioContext)
Types ¶
type AttributesStepDefinitions ¶
type AttributesStepDefinitions struct {
PlatformCukesContext *PlatformTestSuiteContext
}
type AuthorizationServiceStepDefinitions ¶
type AuthorizationServiceStepDefinitions struct{}
type DirectEntitlementsStepDefinitions ¶
type DirectEntitlementsStepDefinitions struct{}
type DockerComposeLogger ¶
func (*DockerComposeLogger) Printf ¶
func (d *DockerComposeLogger) Printf(format string, v ...interface{})
type DynamicValueMappingsStepDefinitions ¶
type DynamicValueMappingsStepDefinitions struct{}
type ERSInlineConfig ¶
type ERSInlineConfig struct {
Mode string
FailureStrategy string
Providers map[string]ERSProviderConfig
Strategies []ERSMappingStrategyConfig
}
type ERSProviderConfig ¶
type ERSStepDefinitions ¶
type ERSStepDefinitions struct {
PlatformCukesContext *PlatformTestSuiteContext
PlatformSteps *LocalPlatformStepDefinitions
}
type EncryptionStepDefinitions ¶
type EncryptionStepDefinitions struct{}
type KasRegistryStepDefinitions ¶
type KasRegistryStepDefinitions struct{}
type LDAPStepDefinitions ¶
type LDAPStepDefinitions struct {
PlatformCukesContext *PlatformTestSuiteContext
}
type LocalDevOptions ¶
type LocalDevOptions struct {
Hostname string
CukesDir string // temp directory for cukes test suite
KeysDir string // directory with opentdf keys
ProjectDir string // the opentdf project directory.
// contains filtered or unexported fields
}
func NewLocalDevOptions ¶
func NewLocalDevOptions() (LocalDevOptions, error)
type LocalDevPlatformGlue ¶
type LocalDevPlatformGlue struct {
Options *LocalDevOptions
Context context.Context //nolint:containedctx // cukes test scenario context
}
func NewLocalDevPlatformGlue ¶
func NewLocalDevPlatformGlue(options LocalDevOptions) *LocalDevPlatformGlue
func (*LocalDevPlatformGlue) Setup ¶
func (l *LocalDevPlatformGlue) Setup(platformCukesContext *PlatformTestSuiteContext) error
Setup local platform including cert/key generation and platform and keycloak configuration setup.
func (*LocalDevPlatformGlue) Shutdown ¶
func (l *LocalDevPlatformGlue) Shutdown(platformCukesContext *PlatformTestSuiteContext) error
type LocalDevScenarioOptions ¶
type LocalPlatformStepDefinitions ¶
type LocalPlatformStepDefinitions struct {
PlatformCukesContext *PlatformTestSuiteContext
}
type NamespacesStepDefinitions ¶
type NamespacesStepDefinitions struct{}
type ObligationsStepDefinitions ¶
type ObligationsStepDefinitions struct{}
type PlatformCukesHelper ¶
type PlatformGlue ¶
type PlatformGlue interface {
Setup(*PlatformTestSuiteContext) error
Shutdown(*PlatformTestSuiteContext) error
}
type PlatformScenarioContext ¶
type PlatformScenarioContext struct {
SDK *otdf.SDK
ID string
ScenarioOptions *LocalDevScenarioOptions
TestSuiteContext *PlatformTestSuiteContext
FirstScenario bool
Stateless bool
Scenario *godog.Scenario
ShutdownHooks []func() error
// contains filtered or unexported fields
}
func GetPlatformScenarioContext ¶
func GetPlatformScenarioContext(ctx context.Context) *PlatformScenarioContext
func (*PlatformScenarioContext) ClearError ¶
func (c *PlatformScenarioContext) ClearError()
func (*PlatformScenarioContext) GetAttributeValue ¶
func (*PlatformScenarioContext) GetError ¶
func (c *PlatformScenarioContext) GetError() error
func (*PlatformScenarioContext) GetObject ¶
func (c *PlatformScenarioContext) GetObject(key string) any
func (*PlatformScenarioContext) RecordObject ¶
func (c *PlatformScenarioContext) RecordObject(key string, obj any)
func (*PlatformScenarioContext) RegisterPlatformShutdownHook ¶
func (c *PlatformScenarioContext) RegisterPlatformShutdownHook(hook func() error)
RegisterPlatformShutdownHook registers a hook that tears down or captures output from platform-lifecycle resources (compose stacks, inline servers, log capture). In stateless mode the platform is shared across scenarios, so these hooks must run once at suite teardown rather than after every scenario. Non-stateless features retain per-scenario teardown.
func (*PlatformScenarioContext) RegisterShutdownHook ¶
func (c *PlatformScenarioContext) RegisterShutdownHook(hook func() error)
func (*PlatformScenarioContext) SetError ¶
func (c *PlatformScenarioContext) SetError(err error)
type PlatformTestSuiteContext ¶
type PlatformTestSuiteContext struct {
PlatformGlue *PlatformGlue
ShutdownFunctions []func() error
FeatureTracker map[string]*PlatformScenarioContext
Logger *slog.Logger
ComposeLogger *slog.Logger
PlatformLogger *slog.Logger
HasFailures bool // Track if any test failures occurred
// contains filtered or unexported fields
}
func (*PlatformTestSuiteContext) InitializeScenario ¶
func (c *PlatformTestSuiteContext) InitializeScenario(scenarioContext *godog.ScenarioContext)
func (*PlatformTestSuiteContext) InitializeTestSuite ¶
func (c *PlatformTestSuiteContext) InitializeTestSuite(ctx *godog.TestSuiteContext)
func (*PlatformTestSuiteContext) RecordFailure ¶
func (c *PlatformTestSuiteContext) RecordFailure()
type RegisteredResourcesStepDefinitions ¶
type RegisteredResourcesStepDefinitions struct{}
type SmokeStepDefinitions ¶
type SmokeStepDefinitions struct {
PlatformCukesContext *PlatformTestSuiteContext
}
type SubjectMappingsStepDefinitions ¶
type SubjectMappingsStepDefinitions struct{}
Source Files
¶
- glue_platform.go
- scale_setup.go
- steps_attributes.go
- steps_authorization.go
- steps_authorization_scale.go
- steps_authorization_scale_generated.go
- steps_authorization_scale_policy.go
- steps_directentitlements.go
- steps_dynamicvaluemappings.go
- steps_encryption.go
- steps_ers.go
- steps_kasregistry.go
- steps_ldap.go
- steps_localplatform.go
- steps_namespaces.go
- steps_obligations.go
- steps_registeredresources.go
- steps_resourcemappings_scale.go
- steps_smoke.go
- steps_subjectmappings.go
- steps_subjectmappings_scale.go