Documentation ¶
Index ¶
- type ClientPipelineRunner
- type MockRunner
- func (m *MockRunner) AssertPipelineRun(pipelineName, ns, repoURL, wantSHA string)
- func (m *MockRunner) FailWithError(err error)
- func (m *MockRunner) RefutePipelineRun(pipelineName, ns, repoURL, wantSHA string)
- func (m *MockRunner) Run(ctx context.Context, pipelineName, ns, repoURL, sha string) (*pipelinev1.PipelineRun, error)
- type PipelineRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientPipelineRunner ¶
type ClientPipelineRunner struct {
// contains filtered or unexported fields
}
ClientPipelineRunner uses a split client to run pipelines.
func NewRunner ¶
func NewRunner(c client.Client) *ClientPipelineRunner
NewRunner creates a new PipelineRunner that creates PipelineRuns with the provided client.
func (*ClientPipelineRunner) Run ¶
func (c *ClientPipelineRunner) Run(ctx context.Context, pipelineName, ns, repoURL, sha string) (*pipelinev1.PipelineRun, error)
Run is an implementation of the PipelineRunner interface.
type MockRunner ¶
type MockRunner struct {
// contains filtered or unexported fields
}
MockRunner is a mock pipeline runner that returns fixed responses to runs.
func NewMockRunner ¶
func NewMockRunner(t *testing.T) *MockRunner
NewMockRunner creates and returns a new mock PipelineRunner.
func (*MockRunner) AssertPipelineRun ¶
func (m *MockRunner) AssertPipelineRun(pipelineName, ns, repoURL, wantSHA string)
AssertPipelineRun ensures that the pipeline run was triggered.
func (*MockRunner) FailWithError ¶
func (m *MockRunner) FailWithError(err error)
FailWithError configures the poller to return errors.
func (*MockRunner) RefutePipelineRun ¶
func (m *MockRunner) RefutePipelineRun(pipelineName, ns, repoURL, wantSHA string)
RefutePipelineRun ensures that the pipeline run was triggered.
func (*MockRunner) Run ¶
func (m *MockRunner) Run(ctx context.Context, pipelineName, ns, repoURL, sha string) (*pipelinev1.PipelineRun, error)
Run is an implementation of the PipelineRunner interface.
type PipelineRunner ¶
type PipelineRunner interface {
Run(ctx context.Context, pipelineName, ns, repoURL, sha string) (*pipelinev1.PipelineRun, error)
}
PipelineRunner executes a pipeline by name, passing in the SHA and RepURL as parameters.