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 RegisterLocalPlatformStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
- func RegisterNamespaceStepDefinitions(ctx *godog.ScenarioContext)
- func RegisterObligationsStepDefinitions(ctx *godog.ScenarioContext, _ *PlatformTestSuiteContext)
- func RegisterSmokeStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
- func RegisterSubjectMappingsStepsDefinitions(ctx *godog.ScenarioContext)
- type AttributesStepDefinitions
- type AuthorizationServiceStepDefinitions
- type DockerComposeLogger
- 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) RegisterShutdownHook(hook func() error)
- func (c *PlatformScenarioContext) SetError(err error)
- type PlatformTestSuiteContext
- type SmokeStepDefinitions
- type SubjectMappingsStepDefinitions
Constants ¶
View Source
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 RegisterLocalPlatformStepDefinitions ¶
func RegisterLocalPlatformStepDefinitions(ctx *godog.ScenarioContext, x *PlatformTestSuiteContext)
func RegisterNamespaceStepDefinitions ¶
func RegisterNamespaceStepDefinitions(ctx *godog.ScenarioContext)
func RegisterObligationsStepDefinitions ¶
func RegisterObligationsStepDefinitions(ctx *godog.ScenarioContext, _ *PlatformTestSuiteContext)
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 DockerComposeLogger ¶
func (*DockerComposeLogger) Printf ¶
func (d *DockerComposeLogger) Printf(format string, v ...interface{})
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) 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
HasFailures bool // Track if any test failures occurred
}
func CreatePlatformCukesContext ¶
func CreatePlatformCukesContext(logger *slog.Logger, composeLogger *slog.Logger) *PlatformTestSuiteContext
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 SmokeStepDefinitions ¶
type SmokeStepDefinitions struct {
PlatformCukesContext *PlatformTestSuiteContext
}
type SubjectMappingsStepDefinitions ¶
type SubjectMappingsStepDefinitions struct{}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.