Documentation
¶
Index ¶
- func ReadTestdata(t *testing.T, filename string) []byte
- func TestdataPath(t *testing.T, filename string) string
- type Agent
- type AgentOption
- type CmdTest
- type CmdTestHelper
- type Contains
- type DAG
- func (d *DAG) Agent(opts ...AgentOption) *Agent
- func (d *DAG) AssertCurrentStatus(t *testing.T, expected scheduler.Status)
- func (d *DAG) AssertHistoryCount(t *testing.T, expected int)
- func (d *DAG) AssertLatestStatus(t *testing.T, expected scheduler.Status)
- func (d *DAG) AssertOutputs(t *testing.T, outputs map[string]any)
- type Helper
- type NotEmpty
- type SyncBuffer
- type TestHelperOption
- type TestOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadTestdata ¶ added in v1.16.1
ReadTestdata reads the content of a testdata file.
Types ¶
type Agent ¶ added in v1.16.0
func (*Agent) RunCheckErr ¶ added in v1.16.0
func (*Agent) RunSuccess ¶ added in v1.16.0
type AgentOption ¶ added in v1.16.0
type AgentOption func(*Agent)
func WithAgentOptions ¶ added in v1.16.0
func WithAgentOptions(options agent.Options) AgentOption
type CmdTest ¶ added in v1.16.4
type CmdTest struct { Name string // Name of the test. Args []string // Arguments to pass to the command. ExpectedOut []string // Expected output to be present in the standard output / error. }
CmdTest is a helper struct to test commands.
type CmdTestHelper ¶ added in v1.16.4
type CmdTestHelper struct {
Helper
}
CmdTestHelper is a helper struct to test commands.
func SetupCommand ¶ added in v1.16.4
func SetupCommand(t *testing.T) CmdTestHelper
func (CmdTestHelper) RunCommand ¶ added in v1.16.4
type DAG ¶ added in v1.16.0
func (*DAG) Agent ¶ added in v1.16.0
func (d *DAG) Agent(opts ...AgentOption) *Agent
func (*DAG) AssertCurrentStatus ¶ added in v1.16.0
func (*DAG) AssertHistoryCount ¶ added in v1.16.0
func (*DAG) AssertLatestStatus ¶ added in v1.16.0
func (*DAG) AssertOutputs ¶ added in v1.16.1
AssertOutputs checks the given outputs against the actual outputs of the DAG Note that this function does not respect dependencies between nodes making the outputs with the same key indeterministic
type Helper ¶ added in v1.16.0
type Helper struct { Context context.Context Cancel context.CancelFunc Config *config.Config LoggingOutput *SyncBuffer Client client.Client HistoryStore persistence.HistoryStore DAGStore persistence.DAGStore // contains filtered or unexported fields }
Helper provides test utilities and configuration
func Setup ¶
func Setup(t *testing.T, opts ...TestHelperOption) Helper
Setup creates a new Helper instance for testing
func (Helper) Cleanup ¶ added in v1.16.0
func (h Helper) Cleanup()
Cleanup removes temporary test directories
type SyncBuffer ¶ added in v1.16.0
type SyncBuffer struct {
// contains filtered or unexported fields
}
SyncBuffer provides thread-safe buffer operations
func (*SyncBuffer) String ¶ added in v1.16.0
func (b *SyncBuffer) String() string
type TestHelperOption ¶ added in v1.16.0
type TestHelperOption func(*TestOptions)
TestHelperOption defines functional options for Helper
func WithCaptureLoggingOutput ¶ added in v1.16.0
func WithCaptureLoggingOutput() TestHelperOption
WithCaptureLoggingOutput creates a logging capture option
func WithDAGsDir ¶ added in v1.16.3
func WithDAGsDir(dir string) TestHelperOption
type TestOptions ¶ added in v1.16.1
Click to show internal directories.
Click to hide internal directories.