scenarios

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseScenario

type BaseScenario struct {
	// contains filtered or unexported fields
}

BaseScenario provides common functionality for test scenarios

func NewBaseScenario

func NewBaseScenario(name, description string, tracer *testing.TraceCollector) *BaseScenario

NewBaseScenario creates a new base scenario

func (*BaseScenario) Cleanup

func (b *BaseScenario) Cleanup(ctx context.Context) error

Cleanup provides default cleanup implementation (does nothing)

func (*BaseScenario) Description

func (b *BaseScenario) Description() string

Description returns the scenario description

func (*BaseScenario) Name

func (b *BaseScenario) Name() string

Name returns the scenario name

func (*BaseScenario) Setup

func (b *BaseScenario) Setup(ctx context.Context) error

Setup provides default setup implementation (does nothing)

func (*BaseScenario) Trace

func (b *BaseScenario) Trace() *testing.TraceCollector

Trace returns the trace collector

type BasicDeliveryTest

type BasicDeliveryTest struct {
	*BaseScenario
	// contains filtered or unexported fields
}

BasicDeliveryTest implements a basic email delivery test scenario

func NewBasicDeliveryTest

func NewBasicDeliveryTest(from, to, subject, body string) *BasicDeliveryTest

NewBasicDeliveryTest creates a new basic delivery test

func (*BasicDeliveryTest) Cleanup

func (t *BasicDeliveryTest) Cleanup(ctx context.Context) error

Cleanup performs cleanup after the test

func (*BasicDeliveryTest) Execute

func (t *BasicDeliveryTest) Execute(ctx context.Context) error

Execute runs the main test logic

func (*BasicDeliveryTest) SetRunner

func (t *BasicDeliveryTest) SetRunner(runner *testing.TestRunner)

SetRunner sets the test runner for this scenario

func (*BasicDeliveryTest) Setup

func (t *BasicDeliveryTest) Setup(ctx context.Context) error

Setup prepares the test scenario

func (*BasicDeliveryTest) Verify

func (t *BasicDeliveryTest) Verify(ctx context.Context) error

Verify checks that the test executed correctly

type TestScenario

type TestScenario interface {
	// Name returns the scenario name
	Name() string

	// Description returns a description of the scenario
	Description() string

	// Setup prepares the scenario for execution
	Setup(ctx context.Context) error

	// Execute runs the main scenario logic
	Execute(ctx context.Context) error

	// Verify checks that the scenario executed correctly
	Verify(ctx context.Context) error

	// Cleanup cleans up after the scenario
	Cleanup(ctx context.Context) error
}

TestScenario defines the interface for test scenarios

Jump to

Keyboard shortcuts

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