Documentation ¶
Index ¶
- Constants
- Variables
- func Exec(name string, args ...string) (string, error)
- func LoadObject(text string) (runtime.Object, error)
- type Condition
- type E2ESuite
- func (s *E2ESuite) AfterTest(_, _ string)
- func (s *E2ESuite) BeforeTest(string, string)
- func (s *E2ESuite) CheckError(err error)
- func (s *E2ESuite) DeleteResources()
- func (s *E2ESuite) GetBasicAuthToken() string
- func (s *E2ESuite) GetServiceAccountToken() (string, error)
- func (s *E2ESuite) Given() *Given
- func (s *E2ESuite) SetupSuite()
- func (s *E2ESuite) TearDownSuite()
- type Given
- func (g *Given) ClusterWorkflowTemplate(text string) *Given
- func (g *Given) CronWorkflow(text string) *Given
- func (g *Given) Exec(name string, args []string, block func(t *testing.T, output string, err error)) *Given
- func (g *Given) RunCli(args []string, block func(t *testing.T, output string, err error)) *Given
- func (g *Given) When() *When
- func (g *Given) Workflow(text string) *Given
- func (g *Given) WorkflowEventBinding(text string) *Given
- func (g *Given) WorkflowName(name string) *Given
- func (g *Given) WorkflowTemplate(text string) *Given
- type Persistence
- type Then
- func (t *Then) ExpectAuditEvents(filter func(event apiv1.Event) bool, blocks ...func(*testing.T, apiv1.Event)) *Then
- func (t *Then) ExpectCron(block func(t *testing.T, cronWf *wfv1.CronWorkflow)) *Then
- func (t *Then) ExpectWorkflow(...) *Then
- func (t *Then) ExpectWorkflowList(listOptions metav1.ListOptions, ...) *Then
- func (t *Then) ExpectWorkflowName(workflowName string, ...) *Then
- func (t *Then) RunCli(args []string, block func(t *testing.T, output string, err error)) *Then
- func (t *Then) When() *When
- type When
- func (w *When) And(block func()) *When
- func (w *When) CreateClusterWorkflowTemplates() *When
- func (w *When) CreateConfigMap(name string, data map[string]string) *When
- func (w *When) CreateCronWorkflow() *When
- func (w *When) CreateWorkflowEventBinding() *When
- func (w *When) CreateWorkflowTemplates() *When
- func (w *When) DeleteConfigMap(name string) *When
- func (w *When) DeleteMemoryQuota() *When
- func (w *When) DeletePodsQuota() *When
- func (w *When) DeleteStorageQuota() *When
- func (w *When) DeleteWorkflow() *When
- func (w *When) Exec(name string, args []string, block func(t *testing.T, output string, err error)) *When
- func (w *When) Given() *Given
- func (w *When) MemoryQuota(memoryLimit string) *When
- func (w *When) PodsQuota(podLimit int) *When
- func (w *When) RunCli(args []string, block func(t *testing.T, output string, err error)) *When
- func (w *When) StorageQuota(storageLimit string) *When
- func (w *When) SubmitWorkflow() *When
- func (w *When) Then() *Then
- func (w *When) Wait(timeout time.Duration) *When
- func (w *When) WaitForWorkflow(options ...interface{}) *When
Constants ¶
View Source
const Label = "argo-e2e"
View Source
const Namespace = "argo"
Variables ¶
View Source
var HasInvolvedObject = func(kind string, uid types.UID) func(event apiv1.Event) bool { return func(e apiv1.Event) bool { return e.InvolvedObject.Kind == kind && e.InvolvedObject.UID == uid } }
View Source
var HasInvolvedObjectWithName = func(kind string, name string) func(event apiv1.Event) bool { return func(e apiv1.Event) bool { return e.InvolvedObject.Kind == kind && e.InvolvedObject.Name == name } }
Functions ¶
Types ¶
type E2ESuite ¶
type E2ESuite struct { suite.Suite Persistence *Persistence RestConfig *rest.Config KubeClient kubernetes.Interface // contains filtered or unexported fields }
func (*E2ESuite) BeforeTest ¶
func (*E2ESuite) CheckError ¶
func (*E2ESuite) DeleteResources ¶
func (s *E2ESuite) DeleteResources()
func (*E2ESuite) GetBasicAuthToken ¶
func (*E2ESuite) GetServiceAccountToken ¶
func (*E2ESuite) SetupSuite ¶
func (s *E2ESuite) SetupSuite()
func (*E2ESuite) TearDownSuite ¶
func (s *E2ESuite) TearDownSuite()
type Given ¶
type Given struct {
// contains filtered or unexported fields
}
func (*Given) ClusterWorkflowTemplate ¶
func (*Given) CronWorkflow ¶
func (*Given) Workflow ¶
creates a workflow based on the parameter, this may be:
1. A file name if it starts with "@" 2. Raw YAML.
func (*Given) WorkflowEventBinding ¶
func (*Given) WorkflowName ¶
func (*Given) WorkflowTemplate ¶
type Persistence ¶
type Persistence struct {
// contains filtered or unexported fields
}
func (*Persistence) Close ¶
func (s *Persistence) Close()
func (*Persistence) IsEnabled ¶
func (s *Persistence) IsEnabled() bool
type Then ¶
type Then struct {
// contains filtered or unexported fields
}
func (*Then) ExpectAuditEvents ¶
func (*Then) ExpectCron ¶
func (*Then) ExpectWorkflow ¶
func (t *Then) ExpectWorkflow(block func(t *testing.T, metadata *metav1.ObjectMeta, status *wfv1.WorkflowStatus)) *Then
func (*Then) ExpectWorkflowList ¶
func (t *Then) ExpectWorkflowList(listOptions metav1.ListOptions, block func(t *testing.T, wfList *wfv1.WorkflowList)) *Then
func (*Then) ExpectWorkflowName ¶
func (t *Then) ExpectWorkflowName(workflowName string, block func(t *testing.T, metadata *metav1.ObjectMeta, status *wfv1.WorkflowStatus)) *Then
type When ¶
type When struct {
// contains filtered or unexported fields
}
func (*When) CreateClusterWorkflowTemplates ¶
func (*When) CreateConfigMap ¶
func (*When) CreateCronWorkflow ¶
func (*When) CreateWorkflowEventBinding ¶
func (*When) CreateWorkflowTemplates ¶
func (*When) DeleteConfigMap ¶
func (*When) DeleteMemoryQuota ¶
func (*When) DeletePodsQuota ¶
func (*When) DeleteStorageQuota ¶
func (*When) DeleteWorkflow ¶
func (*When) MemoryQuota ¶
func (*When) StorageQuota ¶
func (*When) SubmitWorkflow ¶
func (*When) WaitForWorkflow ¶
Wait for a workflow to meet a condition: Options: * `time.Duration` - change the timeout - 30s by default * `string` - either:
- the workflow's name (not spaces)
- or a new message (if it contain spaces) - default "to finish"
* `Condition` - a condition - `ToFinish` by default
Click to show internal directories.
Click to hide internal directories.