cukes

package
v0.0.0-...-7fec42d Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2026 License: BSD-3-Clause-Clear Imports: 59 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const StatelessTag = "@stateless"

Variables

This section is empty.

Functions

func ConvertInterfaceToAny

func ConvertInterfaceToAny(jsonData []byte) (*anypb.Any, error)

func GetActionsFromValues

func GetActionsFromValues(standardActions *string, customActions *string) []*policy.Action

func GetProjectDir

func GetProjectDir() (string, error)

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

func LogComposeServices(c interface{}, logger *slog.Logger)

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

type DockerComposeLogger struct {
	Logger *slog.Logger
}

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 ERSMappingStrategyConfig

type ERSMappingStrategyConfig struct {
	Name     string
	Provider string
	RawYAML  string
}

type ERSProviderConfig

type ERSProviderConfig struct {
	Type         string
	AutoWireLDAP bool
}

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 LocalDevScenarioOptions struct {
	PlatformEndpoint       string
	KeycloakRealm          string
	InsecureSkipVerifyConn bool
	DatabaseName           string
	PlatformPort           int
	LDAPPort               int
}

type LocalPlatformStepDefinitions

type LocalPlatformStepDefinitions struct {
	PlatformCukesContext *PlatformTestSuiteContext
}

type NamespacesStepDefinitions

type NamespacesStepDefinitions struct{}

type ObligationsStepDefinitions

type ObligationsStepDefinitions struct{}

type PlatformCukesHelper

type PlatformCukesHelper interface {
	*context.Context
}

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 (c *PlatformScenarioContext) GetAttributeValue(ctx context.Context, fqn string) (*policy.Value, error)

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 CreatePlatformCukesContext

func CreatePlatformCukesContext(logger *slog.Logger, composeLogger *slog.Logger, platformLogger *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 RegisteredResourcesStepDefinitions

type RegisteredResourcesStepDefinitions struct{}

type SmokeStepDefinitions

type SmokeStepDefinitions struct {
	PlatformCukesContext *PlatformTestSuiteContext
}

type SubjectMappingsStepDefinitions

type SubjectMappingsStepDefinitions struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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