Documentation ¶
Index ¶
- func ApplyCRDs(kubeConfig *rest.Config) error
- type Environment
- type Machine
- func (m *Machine) CollectJobs(namespace string, labels string, n int) ([]batchv1.Job, error)
- func (m *Machine) CreateQuarksJob(namespace string, job qjv1a1.QuarksJob) (*qjv1a1.QuarksJob, machine.TearDownFunc, error)
- func (m *Machine) GetQuarksJob(namespace string, name string) (*qjv1a1.QuarksJob, error)
- func (m *Machine) JobExists(namespace string, name string) (bool, error)
- func (m *Machine) QuarksJobExists(namespace string, name string) (bool, error)
- func (m *Machine) UpdateQuarksJob(namespace string, qJob qjv1a1.QuarksJob) error
- func (m *Machine) WaitForJobDeletion(namespace string, name string) error
- func (m *Machine) WaitForJobExists(namespace string, labels string) (bool, error)
- func (m *Machine) WaitForQuarksJobDeletion(namespace string, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Environment ¶
type Environment struct { *utils.Environment Machine testing.Catalog }
Environment test env with helpers to create structs and k8s resources
func NewEnvironment ¶
func NewEnvironment(kubeConfig *rest.Config) *Environment
NewEnvironment returns a new test environment
func (*Environment) NamespaceDeletionInProgress ¶
func (e *Environment) NamespaceDeletionInProgress(err error) bool
NamespaceDeletionInProgress returns true if the error indicates deletion will happen eventually
func (*Environment) SetupClientsets ¶
func (e *Environment) SetupClientsets() error
SetupClientsets initializes kube clientsets
func (*Environment) SetupNamespace ¶
func (e *Environment) SetupNamespace() error
SetupNamespace creates the namespace and the clientsets and prepares the teardowm
func (*Environment) SetupServiceAccount ¶
func (e *Environment) SetupServiceAccount() error
SetupServiceAccount creates a service account for the pod
func (*Environment) StartOperator ¶
func (e *Environment) StartOperator() (chan struct{}, error)
StartOperator starts the quarks job operator
type Machine ¶
Machine produces and destroys resources for tests
func (*Machine) CollectJobs ¶
CollectJobs waits for n jobs with specified labels. It fails after the timeout.
func (*Machine) CreateQuarksJob ¶
func (m *Machine) CreateQuarksJob(namespace string, job qjv1a1.QuarksJob) (*qjv1a1.QuarksJob, machine.TearDownFunc, error)
CreateQuarksJob creates an QuarksJob
func (*Machine) GetQuarksJob ¶
GetQuarksJob gets an QuarksJob custom resource
func (*Machine) QuarksJobExists ¶
QuarksJobExists returns true if quarks job with that name exists
func (*Machine) UpdateQuarksJob ¶
UpdateQuarksJob updates an quarks job
func (*Machine) WaitForJobDeletion ¶
WaitForJobDeletion blocks until the batchv1.Job is deleted
func (*Machine) WaitForJobExists ¶
WaitForJobExists polls until a short timeout is reached or a job is found It returns true only if a job is found