Documentation
¶
Index ¶
- type TestQMI
- func (t TestQMI) AddListToRunningQueue(_ *pacv1alpha1.Repository, list []string) ([]string, error)
- func (TestQMI) AddToPendingQueue(_ *pacv1alpha1.Repository, _ []string) error
- func (TestQMI) InitQueues(_ context.Context, _ tektonVersionedClient.Interface, ...) error
- func (t TestQMI) QueuedPipelineRuns(_ *pacv1alpha1.Repository) []string
- func (t TestQMI) RemoveAndTakeItemFromQueue(_ *pacv1alpha1.Repository, _ *tektonv1.PipelineRun) string
- func (t TestQMI) RemoveFromQueue(repoKey, prKey string) bool
- func (TestQMI) RemoveRepository(_ *pacv1alpha1.Repository)
- func (TestQMI) RunningPipelineRuns(_ *pacv1alpha1.Repository) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestQMI ¶
type TestQMI struct {
QueuedPrs []string
RunningQueue []string
// Removed records the "repoKey|prKey" pairs passed to RemoveFromQueue, so
// tests can assert whether a queue slot was released.
Removed *[]string
// NextInQueue is drained one key per RemoveAndTakeItemFromQueue call, so
// tests can feed the promotion loop a sequence of candidates.
NextInQueue *[]string
// EchoAcquired makes AddListToRunningQueue return exactly the list it was
// given instead of the fixed RunningQueue, so a test can observe whether a
// dropped key is still present in the list passed on a later call.
EchoAcquired bool
// Passed records the list argument of every AddListToRunningQueue call, in
// order, so a test can assert what a later retry iteration was given.
Passed *[][]string
// Taken counts RemoveAndTakeItemFromQueue calls, so a test can assert the
// finished PipelineRun's slot was released at least once.
Taken *int
// RepeatNext makes RemoveAndTakeItemFromQueue hand out the same key
// forever, modelling a queue that never releases a slot, so a test can
// check the caller gives up instead of looping.
RepeatNext string
}
func (TestQMI) AddListToRunningQueue ¶
func (t TestQMI) AddListToRunningQueue(_ *pacv1alpha1.Repository, list []string) ([]string, error)
func (TestQMI) AddToPendingQueue ¶
func (TestQMI) AddToPendingQueue(_ *pacv1alpha1.Repository, _ []string) error
func (TestQMI) InitQueues ¶
func (TestQMI) InitQueues(_ context.Context, _ tektonVersionedClient.Interface, _ pacVersionedClient.Interface) error
func (TestQMI) QueuedPipelineRuns ¶
func (t TestQMI) QueuedPipelineRuns(_ *pacv1alpha1.Repository) []string
func (TestQMI) RemoveAndTakeItemFromQueue ¶
func (t TestQMI) RemoveAndTakeItemFromQueue(_ *pacv1alpha1.Repository, _ *tektonv1.PipelineRun) string
func (TestQMI) RemoveFromQueue ¶
func (TestQMI) RemoveRepository ¶
func (TestQMI) RemoveRepository(_ *pacv1alpha1.Repository)
func (TestQMI) RunningPipelineRuns ¶
func (TestQMI) RunningPipelineRuns(_ *pacv1alpha1.Repository) []string
Click to show internal directories.
Click to hide internal directories.