Documentation
¶
Overview ¶
Package test provides unified testing infrastructure for MPC protocols
Package test provides unified testing utilities for MPC protocols. This file consolidates common testing patterns and utilities to follow DRY principles.
Index ¶
- Variables
- func CreateMockCMPConfigs(partyIDs []party.ID, threshold int) []interface{}
- func CreateMockFROSTConfigs(partyIDs []party.ID, threshold int) []interface{}
- func CreateMockLSSConfigs(partyIDs []party.ID, threshold int) []*config.Config
- func GenerateConfig(group curve.Curve, N, T int, source io.Reader, pl *pool.Pool) (map[party.ID]*config.Config, party.IDSlice)
- func HandlerLoop(id party.ID, h *protocol.Handler, network *Network)
- func HandlerLoopWithTimeout(t testing.TB, id party.ID, h *protocol.Handler, network *Network, ...) error
- func PartyIDs(n int) party.IDSlice
- func QuickMPCTest(t *testing.T, protocolType MPCProtocolType, partyCount, threshold int, ...)
- func Rounds(rounds []round.Session, rule Rule) (error, bool)
- func RunKeygenRefreshSign(t *testing.T, n, threshold int, pool *pool.Pool)
- func RunMPCProtocolTest(t *testing.T, protocolName string, partyCount int, threshold int, ...)
- func RunMultipleProtocolTests(t *testing.T, tests []ProtocolTest)
- func RunProtocol(t testing.TB, partyIDs []party.ID, sessionID []byte, ...) (map[party.ID]interface{}, error)
- func RunProtocolAsync(t testing.TB, parties []party.ID, startFuncs map[party.ID]protocol.StartFunc, ...) (map[party.ID]interface{}, error)
- func RunProtocolBenchmarks(b *testing.B, benchmarks []ProtocolBenchmark)
- func RunProtocolWithTimeout(t testing.TB, partyIDs []party.ID, sessionID []byte, timeout time.Duration, ...) (map[party.ID]interface{}, error)
- func RunProtocolWithTimeoutNew(t testing.TB, partyIDs []party.ID, timeout time.Duration, ...) (map[party.ID]interface{}, error)
- func RunSingleProtocol(t *testing.T, selfID party.ID, allParties []party.ID, sessionID []byte, ...) (interface{}, error)
- func SimpleProtocolTest(t *testing.T, name string, n int, threshold int, ...)
- func StandardMPCBenchmark(b *testing.B, protocolType MPCProtocolType, partyCount, threshold int, ...)
- func StandardMPCTest(t *testing.T, protocolType MPCProtocolType, partyCount, threshold int, ...)
- type AsyncRunner
- type HandlerState
- type Harness
- func (h *Harness) Cleanup()
- func (h *Harness) CreateHandler(id party.ID, startFunc protocol.StartFunc, sessionID []byte) (*protocol.Handler, error)
- func (h *Harness) Errors() map[party.ID]error
- func (h *Harness) Result(id party.ID) (interface{}, error)
- func (h *Harness) Results() map[party.ID]interface{}
- func (h *Harness) Run() error
- func (h *Harness) WithLogger(logger log.Logger) *Harness
- func (h *Harness) WithTimeout(timeout time.Duration) *Harness
- type KeygenAndSign
- type MPCProtocolType
- type MPCTestConfig
- type MPCTestEnvironment
- func (env *MPCTestEnvironment) CreateHandler(t *testing.T, id party.ID, startFunc protocol.StartFunc, sessionID []byte) *protocol.Handler
- func (env *MPCTestEnvironment) RunProtocolInitTest(t *testing.T, protocolName string, ...)
- func (env *MPCTestEnvironment) RunProtocolSimpleTest(t *testing.T, protocolName string, ...) map[party.ID]interface{}
- func (env *MPCTestEnvironment) RunProtocolWithTimeout(t *testing.T, protocolName string, ...) error
- type MPCTestHelper
- func (h *MPCTestHelper) GetAllResults() map[party.ID]interface{}
- func (h *MPCTestHelper) GetConfig(id party.ID) interface{}
- func (h *MPCTestHelper) GetResult(id party.ID) interface{}
- func (h *MPCTestHelper) StoreConfig(id party.ID, config interface{})
- func (h *MPCTestHelper) StoreResult(id party.ID, result interface{})
- type MPCTestSuite
- func (s *MPCTestSuite) Cleanup()
- func (s *MPCTestSuite) RunBenchmark(b *testing.B, ...)
- func (s *MPCTestSuite) RunFullTest(...)
- func (s *MPCTestSuite) RunInitTest(...)
- func (s *MPCTestSuite) RunSimpleTest(...)
- func (s *MPCTestSuite) WithGroup(group curve.Curve) *MPCTestSuite
- func (s *MPCTestSuite) WithTimeout(timeout time.Duration) *MPCTestSuite
- type Network
- type NetworkInterface
- type PhaseHarness
- type ProtocolBenchmark
- type ProtocolRunner
- type ProtocolTest
- type ProtocolTestSuite
- type Rule
- type TestConfig
Constants ¶
This section is empty.
Variables ¶
var StandardTimeouts = struct { Quick time.Duration Normal time.Duration Extended time.Duration Long time.Duration }{ Quick: 2 * time.Second, Normal: 10 * time.Second, Extended: 30 * time.Second, Long: 60 * time.Second, }
StandardTimeouts provides standard timeout values for different test scenarios
Functions ¶
func CreateMockCMPConfigs ¶ added in v1.0.1
CreateMockCMPConfigs creates mock CMP configs for testing
func CreateMockFROSTConfigs ¶ added in v1.0.1
CreateMockFROSTConfigs creates mock FROST configs for testing
func CreateMockLSSConfigs ¶ added in v1.0.1
CreateMockLSSConfigs creates mock LSS configs for testing
func GenerateConfig ¶
func GenerateConfig(group curve.Curve, N, T int, source io.Reader, pl *pool.Pool) (map[party.ID]*config.Config, party.IDSlice)
GenerateConfig creates some random configuration for N parties with set threshold T over the group.
func HandlerLoop ¶
HandlerLoop blocks until the handler has finished. The result of the execution is given by Handler.Result().
func HandlerLoopWithTimeout ¶ added in v1.0.1
func HandlerLoopWithTimeout(t testing.TB, id party.ID, h *protocol.Handler, network *Network, timeout time.Duration) error
HandlerLoopWithTimeout runs a handler with proper timeout and cleanup
func QuickMPCTest ¶ added in v1.0.1
func QuickMPCTest(t *testing.T, protocolType MPCProtocolType, partyCount, threshold int, createStartFunc func(id party.ID, partyIDs []party.ID, threshold int, group curve.Curve, pl *pool.Pool) protocol.StartFunc)
QuickMPCTest runs a quick test suitable for CI/fast feedback
func RunKeygenRefreshSign ¶ added in v1.0.1
RunKeygenRefreshSign runs a complete keygen-refresh-sign cycle
func RunMPCProtocolTest ¶ added in v1.0.1
func RunMPCProtocolTest( t *testing.T, protocolName string, partyCount int, threshold int, createStartFunc func(id party.ID, partyIDs []party.ID, threshold int, group curve.Curve, pl *pool.Pool) protocol.StartFunc, )
RunMPCProtocolTest is a helper function to run a standard MPC protocol test
func RunMultipleProtocolTests ¶ added in v1.0.1
func RunMultipleProtocolTests(t *testing.T, tests []ProtocolTest)
RunMultipleProtocolTests runs multiple protocol tests
func RunProtocol ¶ added in v1.0.1
func RunProtocol(t testing.TB, partyIDs []party.ID, sessionID []byte, createStart func(party.ID) protocol.StartFunc) (map[party.ID]interface{}, error)
RunProtocol is a convenience function to run a protocol with all parties
func RunProtocolAsync ¶ added in v1.0.1
func RunProtocolAsync(t testing.TB, parties []party.ID, startFuncs map[party.ID]protocol.StartFunc, config *TestConfig) (map[party.ID]interface{}, error)
RunProtocolAsync is a helper to run a protocol with async handling
func RunProtocolBenchmarks ¶ added in v1.0.1
func RunProtocolBenchmarks(b *testing.B, benchmarks []ProtocolBenchmark)
RunProtocolBenchmarks runs multiple protocol benchmarks
func RunProtocolWithTimeout ¶ added in v1.0.1
func RunProtocolWithTimeout(t testing.TB, partyIDs []party.ID, sessionID []byte, timeout time.Duration, createStart func(party.ID) protocol.StartFunc) (map[party.ID]interface{}, error)
RunProtocolWithTimeout runs a protocol with a custom timeout
func RunProtocolWithTimeoutNew ¶ added in v1.0.1
func RunProtocolWithTimeoutNew(t testing.TB, partyIDs []party.ID, timeout time.Duration, createHandlers func() map[party.ID]*protocol.Handler) (map[party.ID]interface{}, error)
RunProtocolWithTimeoutNew runs a protocol with better timeout handling
func RunSingleProtocol ¶ added in v1.0.1
func RunSingleProtocol(t *testing.T, selfID party.ID, allParties []party.ID, sessionID []byte, startFunc protocol.StartFunc) (interface{}, error)
RunSingleProtocol runs a single party's protocol instance for testing
func SimpleProtocolTest ¶ added in v1.0.1
func SimpleProtocolTest(t *testing.T, name string, n int, threshold int, testFunc func(partyIDs []party.ID) bool)
SimpleProtocolTest provides a simple way to test protocols without complex synchronization
func StandardMPCBenchmark ¶ added in v1.0.1
func StandardMPCBenchmark(b *testing.B, protocolType MPCProtocolType, partyCount, threshold int, createStartFunc func(id party.ID, partyIDs []party.ID, threshold int, group curve.Curve, pl *pool.Pool) protocol.StartFunc)
StandardMPCBenchmark runs a standard benchmark for an MPC protocol
func StandardMPCTest ¶ added in v1.0.1
func StandardMPCTest(t *testing.T, protocolType MPCProtocolType, partyCount, threshold int, createStartFunc func(id party.ID, partyIDs []party.ID, threshold int, group curve.Curve, pl *pool.Pool) protocol.StartFunc)
StandardMPCTest runs a standard test sequence for an MPC protocol
Types ¶
type AsyncRunner ¶ added in v1.0.1
type AsyncRunner struct {
// contains filtered or unexported fields
}
AsyncRunner provides fully async, thread-safe protocol execution
func NewAsyncRunner ¶ added in v1.0.1
func NewAsyncRunner(t testing.TB, config *TestConfig, network NetworkInterface) *AsyncRunner
NewAsyncRunner creates a new async runner
func (*AsyncRunner) Cleanup ¶ added in v1.0.1
func (r *AsyncRunner) Cleanup()
Cleanup cleans up resources
func (*AsyncRunner) Errors ¶ added in v1.0.1
func (r *AsyncRunner) Errors() map[party.ID]error
Errors returns any errors that occurred
func (*AsyncRunner) Results ¶ added in v1.0.1
func (r *AsyncRunner) Results() map[party.ID]interface{}
Results returns the results from all parties
func (*AsyncRunner) RunAsync ¶ added in v1.0.1
func (r *AsyncRunner) RunAsync() error
RunAsync executes all handlers asynchronously
func (*AsyncRunner) SetupParty ¶ added in v1.0.1
SetupParty initializes a single party handler
type HandlerState ¶ added in v1.0.1
type HandlerState struct {
// contains filtered or unexported fields
}
HandlerState tracks individual handler state
type Harness ¶ added in v1.0.1
type Harness struct {
// contains filtered or unexported fields
}
Harness provides a complete test environment for protocol testing
func NewHarness ¶ added in v1.0.1
NewHarness creates a new test harness with proper context management
func (*Harness) Cleanup ¶ added in v1.0.1
func (h *Harness) Cleanup()
Cleanup releases all resources
func (*Harness) CreateHandler ¶ added in v1.0.1
func (h *Harness) CreateHandler(id party.ID, startFunc protocol.StartFunc, sessionID []byte) (*protocol.Handler, error)
CreateHandler creates a new protocol handler for a party
func (*Harness) Run ¶ added in v1.0.1
Run executes all handlers concurrently with proper synchronization
func (*Harness) WithLogger ¶ added in v1.0.1
WithLogger sets a custom logger
type KeygenAndSign ¶ added in v1.0.1
type KeygenAndSign struct {
Name string
PartyCount int
Threshold int
Message []byte
CreateKeygen func(id party.ID, ids []party.ID, threshold int) protocol.StartFunc
CreateSign func(config interface{}, signers []party.ID, message []byte) protocol.StartFunc
ValidateSign func(t *testing.T, config interface{}, signature interface{}, message []byte)
}
KeygenAndSign performs keygen followed by signing for threshold protocols
func (*KeygenAndSign) Run ¶ added in v1.0.1
func (ks *KeygenAndSign) Run(t *testing.T)
Run executes the keygen and sign test
type MPCProtocolType ¶ added in v1.0.1
type MPCProtocolType string
MPCProtocolType identifies the type of MPC protocol being tested
const ( ProtocolLSS MPCProtocolType = "LSS" ProtocolFROST MPCProtocolType = "FROST" ProtocolCMP MPCProtocolType = "CMP" ProtocolDoerner MPCProtocolType = "Doerner" ProtocolRingtail MPCProtocolType = "Ringtail" )
type MPCTestConfig ¶ added in v1.0.1
type MPCTestConfig struct {
// PartyCount is the total number of parties
PartyCount int
// Threshold is the threshold for the protocol
Threshold int
// Timeout defines how long to wait for protocol completion
Timeout time.Duration
// Group is the elliptic curve group to use
Group curve.Curve
// QuickTest indicates whether to run a simplified test
QuickTest bool
// SkipNetworkTest indicates whether to skip full network simulation
SkipNetworkTest bool
// Verbose enables detailed logging
Verbose bool
}
MPCTestConfig defines configuration for MPC protocol tests
func DefaultMPCTestConfig ¶ added in v1.0.1
func DefaultMPCTestConfig(partyCount, threshold int) MPCTestConfig
DefaultMPCTestConfig returns a default test configuration
func QuickMPCTestConfig ¶ added in v1.0.1
func QuickMPCTestConfig(partyCount, threshold int) MPCTestConfig
QuickMPCTestConfig returns a configuration for quick tests
type MPCTestEnvironment ¶ added in v1.0.1
type MPCTestEnvironment struct {
// Config is the test configuration
Config MPCTestConfig
// PartyIDs are the party identifiers
PartyIDs []party.ID
// Pool is the computation pool
Pool *pool.Pool
// Network is the test network for message passing
Network *Network
// contains filtered or unexported fields
}
MPCTestEnvironment provides a test environment for MPC protocols
func NewMPCTestEnvironment ¶ added in v1.0.1
func NewMPCTestEnvironment(t *testing.T, config MPCTestConfig) *MPCTestEnvironment
NewMPCTestEnvironment creates a new test environment
func (*MPCTestEnvironment) CreateHandler ¶ added in v1.0.1
func (env *MPCTestEnvironment) CreateHandler( t *testing.T, id party.ID, startFunc protocol.StartFunc, sessionID []byte, ) *protocol.Handler
CreateHandler creates a protocol handler with proper configuration
func (*MPCTestEnvironment) RunProtocolInitTest ¶ added in v1.0.1
func (env *MPCTestEnvironment) RunProtocolInitTest( t *testing.T, protocolName string, createStartFunc func(id party.ID) protocol.StartFunc, )
RunProtocolInitTest tests protocol initialization without full execution
func (*MPCTestEnvironment) RunProtocolSimpleTest ¶ added in v1.0.1
func (env *MPCTestEnvironment) RunProtocolSimpleTest( t *testing.T, protocolName string, createStartFunc func(id party.ID) protocol.StartFunc, ) map[party.ID]interface{}
RunProtocolSimpleTest runs a simplified protocol test with basic message exchange
func (*MPCTestEnvironment) RunProtocolWithTimeout ¶ added in v1.0.1
func (env *MPCTestEnvironment) RunProtocolWithTimeout( t *testing.T, protocolName string, createStartFunc func(id party.ID) protocol.StartFunc, validateResults func(results map[party.ID]interface{}) error, ) error
RunProtocolWithTimeout runs a protocol with proper timeout and error handling
type MPCTestHelper ¶ added in v1.0.1
type MPCTestHelper struct {
// contains filtered or unexported fields
}
MPCTestHelper provides helper functions for MPC protocol tests
func NewMPCTestHelper ¶ added in v1.0.1
func NewMPCTestHelper() *MPCTestHelper
NewMPCTestHelper creates a new test helper
func (*MPCTestHelper) GetAllResults ¶ added in v1.0.1
func (h *MPCTestHelper) GetAllResults() map[party.ID]interface{}
GetAllResults retrieves all results
func (*MPCTestHelper) GetConfig ¶ added in v1.0.1
func (h *MPCTestHelper) GetConfig(id party.ID) interface{}
GetConfig retrieves a configuration for a party
func (*MPCTestHelper) GetResult ¶ added in v1.0.1
func (h *MPCTestHelper) GetResult(id party.ID) interface{}
GetResult retrieves a result for a party
func (*MPCTestHelper) StoreConfig ¶ added in v1.0.1
func (h *MPCTestHelper) StoreConfig(id party.ID, config interface{})
StoreConfig stores a configuration for a party
func (*MPCTestHelper) StoreResult ¶ added in v1.0.1
func (h *MPCTestHelper) StoreResult(id party.ID, result interface{})
StoreResult stores a result for a party
type MPCTestSuite ¶ added in v1.0.1
type MPCTestSuite struct {
// contains filtered or unexported fields
}
MPCTestSuite provides a unified test suite for all MPC protocols
func NewMPCTestSuite ¶ added in v1.0.1
func NewMPCTestSuite(t *testing.T, protocolType MPCProtocolType, partyCount, threshold int) *MPCTestSuite
NewMPCTestSuite creates a new unified test suite
func (*MPCTestSuite) Cleanup ¶ added in v1.0.1
func (s *MPCTestSuite) Cleanup()
Cleanup cleans up test resources
func (*MPCTestSuite) RunBenchmark ¶ added in v1.0.1
func (s *MPCTestSuite) RunBenchmark(b *testing.B, createStartFunc func(id party.ID, partyIDs []party.ID, threshold int, group curve.Curve, pl *pool.Pool) protocol.StartFunc)
RunBenchmark runs a benchmark test for the protocol
func (*MPCTestSuite) RunFullTest ¶ added in v1.0.1
func (s *MPCTestSuite) RunFullTest( createStartFunc func(id party.ID, partyIDs []party.ID, threshold int, group curve.Curve, pl *pool.Pool) protocol.StartFunc, validateResults func(results map[party.ID]interface{}) error, )
RunFullTest runs a full protocol test with proper timeout handling
func (*MPCTestSuite) RunInitTest ¶ added in v1.0.1
func (s *MPCTestSuite) RunInitTest(createStartFunc func(id party.ID, partyIDs []party.ID, threshold int, group curve.Curve, pl *pool.Pool) protocol.StartFunc)
RunInitTest tests protocol initialization without full execution
func (*MPCTestSuite) RunSimpleTest ¶ added in v1.0.1
func (s *MPCTestSuite) RunSimpleTest(createStartFunc func(id party.ID, partyIDs []party.ID, threshold int, group curve.Curve, pl *pool.Pool) protocol.StartFunc)
RunSimpleTest runs a simplified protocol test with basic message exchange
func (*MPCTestSuite) WithGroup ¶ added in v1.0.1
func (s *MPCTestSuite) WithGroup(group curve.Curve) *MPCTestSuite
WithGroup sets a custom elliptic curve group
func (*MPCTestSuite) WithTimeout ¶ added in v1.0.1
func (s *MPCTestSuite) WithTimeout(timeout time.Duration) *MPCTestSuite
WithTimeout sets a custom timeout
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network is a local in-memory network for testing (default implementation)
func NewNetwork ¶
NewNetwork creates a simple test network
func (*Network) SetSession ¶ added in v1.0.1
SetSession is a no-op for simple network
type NetworkInterface ¶ added in v1.0.1
type NetworkInterface interface {
Send(*protocol.Message)
Next(party.ID) <-chan *protocol.Message
Close()
}
NetworkInterface abstracts network implementation
type PhaseHarness ¶ added in v1.0.1
type PhaseHarness struct {
// contains filtered or unexported fields
}
PhaseHarness provides phase-gated test environment for protocol testing
func NewPhaseHarness ¶ added in v1.0.1
func NewPhaseHarness(t testing.TB, ids []party.ID) *PhaseHarness
NewPhaseHarness creates a new phase-gated test harness
func (*PhaseHarness) Reset ¶ added in v1.0.1
func (h *PhaseHarness) Reset()
Reset creates a fresh network for the next phase (optional)
func (*PhaseHarness) RunPhase ¶ added in v1.0.1
func (h *PhaseHarness) RunPhase(timeout time.Duration, startFor func(id party.ID) protocol.StartFunc) (map[party.ID]interface{}, error)
RunPhase starts all handlers for a single phase, waits for all results, then returns them. It guarantees: (1) fresh session; (2) all handlers live before traffic; (3) phase timeout ownership.
type ProtocolBenchmark ¶ added in v1.0.1
type ProtocolBenchmark struct {
Name string
PartyCount int
Threshold int
CreateStart func(id party.ID, ids []party.ID, threshold int) protocol.StartFunc
}
ProtocolBenchmark provides benchmarking utilities
func (*ProtocolBenchmark) Run ¶ added in v1.0.1
func (pb *ProtocolBenchmark) Run(b *testing.B)
Run executes the benchmark
type ProtocolRunner ¶ added in v1.0.1
type ProtocolRunner struct {
// contains filtered or unexported fields
}
ProtocolRunner provides a reliable way to run protocol tests
func NewRunner ¶ added in v1.0.1
func NewRunner(t testing.TB, config *TestConfig) *ProtocolRunner
NewRunner creates a new protocol runner with the given config
func (*ProtocolRunner) Cleanup ¶ added in v1.0.1
func (r *ProtocolRunner) Cleanup()
Cleanup cleans up resources
func (*ProtocolRunner) Errors ¶ added in v1.0.1
func (r *ProtocolRunner) Errors() map[party.ID]error
Errors returns any errors that occurred
func (*ProtocolRunner) Results ¶ added in v1.0.1
func (r *ProtocolRunner) Results() map[party.ID]interface{}
Results returns the results from all parties
func (*ProtocolRunner) Run ¶ added in v1.0.1
func (r *ProtocolRunner) Run() error
Run executes the protocol with proper synchronization and timeout handling
type ProtocolTest ¶ added in v1.0.1
type ProtocolTest struct {
Name string
PartyCount int
Threshold int
SessionID []byte
CreateStart func(id party.ID, ids []party.ID, threshold int) protocol.StartFunc
Validate func(t *testing.T, results map[party.ID]interface{})
}
ProtocolTest represents a test case for a protocol
func (*ProtocolTest) Run ¶ added in v1.0.1
func (pt *ProtocolTest) Run(t *testing.T)
Run executes the protocol test
type ProtocolTestSuite ¶ added in v1.0.1
type ProtocolTestSuite struct {
// contains filtered or unexported fields
}
ProtocolTestSuite provides a clean, reusable test framework for MPC protocols
func NewProtocolTestSuite ¶ added in v1.0.1
func NewProtocolTestSuite(t testing.TB, parties []party.ID) *ProtocolTestSuite
NewProtocolTestSuite creates a new test suite for the given parties
func (*ProtocolTestSuite) Cleanup ¶ added in v1.0.1
func (s *ProtocolTestSuite) Cleanup()
Cleanup releases resources
type Rule ¶
type Rule interface {
// ModifyBefore modifies r before r.Finalize() is called.
ModifyBefore(r round.Session)
// ModifyAfter modifies rNext, which is the round returned by r.Finalize().
ModifyAfter(rNext round.Session)
// ModifyContent modifies content for the message that is delivered in rNext.
ModifyContent(rNext round.Session, to party.ID, content round.Content)
}
Rule describes various hooks that can be applied to a protocol execution.
type TestConfig ¶ added in v1.0.1
type TestConfig struct {
// Timeouts
MessageTimeout time.Duration
RoundTimeout time.Duration
ProtocolTimeout time.Duration
TestTimeout time.Duration
// Concurrency
Workers int
PriorityWorkers int
BufferSize int
PriorityBuffer int
// Network
UseZMQ bool
BasePort int
// Debug
EnableLogging bool
LogLevel string
}
TestConfig provides standardized configuration for all protocol tests
func BenchmarkConfig ¶ added in v1.0.1
func BenchmarkConfig() *TestConfig
BenchmarkConfig returns config optimized for benchmarks
func DefaultTestConfig ¶ added in v1.0.1
func DefaultTestConfig() *TestConfig
DefaultTestConfig returns sensible defaults for unit tests
func IntegrationTestConfig ¶ added in v1.0.1
func IntegrationTestConfig() *TestConfig
IntegrationTestConfig returns config for integration tests
func (*TestConfig) Apply ¶ added in v1.0.1
func (c *TestConfig) Apply()
Apply applies config to environment variables if needed
func (*TestConfig) WithContext ¶ added in v1.0.1
func (c *TestConfig) WithContext(t testing.TB) (context.Context, context.CancelFunc)
WithContext creates a context with the test timeout