Documentation ¶
Index ¶
- type Actions
- func (a *Actions) And(block func()) *Actions
- func (a *Actions) AppSet(appName string, flags ...string) *Actions
- func (a *Actions) Create(appSet v1alpha1.ApplicationSet) *Actions
- func (a *Actions) CreateClusterSecret(secretName string, clusterName string, clusterServer string) *Actions
- func (a *Actions) CreateNamespace(namespace string) *Actions
- func (a *Actions) CreatePlacementDecision(placementDecisionName string) *Actions
- func (a *Actions) CreatePlacementDecisionConfigMap(configMapName string) *Actions
- func (a *Actions) CreatePlacementRoleAndRoleBinding() *Actions
- func (a *Actions) Delete() *Actions
- func (a *Actions) DeleteClusterSecret(secretName string) *Actions
- func (a *Actions) DeleteConfigMap(configMapName string) *Actions
- func (a *Actions) DeletePlacementDecision(placementDecisionName string) *Actions
- func (a *Actions) DoNotIgnoreErrors() *Actions
- func (a *Actions) IgnoreErrors() *Actions
- func (a *Actions) StatusUpdatePlacementDecision(placementDecisionName string, clusterList []interface{}) *Actions
- func (a *Actions) SwitchToArgoCDNamespace() *Actions
- func (a *Actions) SwitchToExternalNamespace() *Actions
- func (a *Actions) Then() *Consequences
- func (a *Actions) Update(toUpdate func(*v1alpha1.ApplicationSet)) *Actions
- type Consequences
- type Context
- type Expectation
- func ApplicationSetHasConditions(applicationSetName string, ...) Expectation
- func ApplicationsDoNotExist(expectedApps []v1alpha1.Application) Expectation
- func ApplicationsExist(expectedApps []v1alpha1.Application) Expectation
- func Error(message, err string) Expectation
- func Pod(predicate func(p corev1.Pod) bool) Expectation
- func Success(message string) Expectation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actions ¶
type Actions struct {
// contains filtered or unexported fields
}
this implements the "when" part of given/when/then
none of the func implement error checks, and that is complete intended, you should check for errors using the Then()
func (*Actions) Create ¶
func (a *Actions) Create(appSet v1alpha1.ApplicationSet) *Actions
Create creates an ApplicationSet using the provided value
func (*Actions) CreateClusterSecret ¶
func (a *Actions) CreateClusterSecret(secretName string, clusterName string, clusterServer string) *Actions
CreateClusterSecret creates a faux cluster secret, with the given cluster server and cluster name (this cluster will not actually be used by the Argo CD controller, but that's not needed for our E2E tests)
func (*Actions) CreateNamespace ¶
Create a temporary namespace, from utils.ApplicationSet, for use by the test. This namespace will be deleted on subsequent tests.
func (*Actions) CreatePlacementDecision ¶
func (*Actions) CreatePlacementDecisionConfigMap ¶
Create a ConfigMap for the ClusterResourceList generator
func (*Actions) CreatePlacementRoleAndRoleBinding ¶
Create Role/RoleBinding to allow ApplicationSet to list the PlacementDecisions
func (*Actions) DeleteClusterSecret ¶
DeleteClusterSecret deletes a faux cluster secret
func (*Actions) DeleteConfigMap ¶
DeleteConfigMap deletes a faux cluster secret
func (*Actions) DeletePlacementDecision ¶
DeletePlacementDecision deletes a faux cluster secret
func (*Actions) DoNotIgnoreErrors ¶
func (*Actions) IgnoreErrors ¶
IgnoreErrors sets whether to ignore
func (*Actions) StatusUpdatePlacementDecision ¶
func (*Actions) SwitchToArgoCDNamespace ¶ added in v2.8.0
func (*Actions) SwitchToExternalNamespace ¶ added in v2.8.0
func (*Actions) Then ¶
func (a *Actions) Then() *Consequences
type Consequences ¶
type Consequences struct {
// contains filtered or unexported fields
}
this implements the "then" part of given/when/then
func (*Consequences) And ¶
func (c *Consequences) And(block func()) *Consequences
func (*Consequences) Expect ¶
func (c *Consequences) Expect(e Expectation) *Consequences
func (*Consequences) ExpectWithDuration ¶
func (c *Consequences) ExpectWithDuration(e Expectation, timeout time.Duration) *Consequences
func (*Consequences) Given ¶
func (c *Consequences) Given() *Context
func (*Consequences) When ¶
func (c *Consequences) When() *Actions
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context implements the "given" part of given/when/then
type Expectation ¶
type Expectation func(c *Consequences) (state state, message string)
Expectation returns succeeded on succes condition, or pending/failed on failure, along with a message to describe the success/failure condition.
func ApplicationSetHasConditions ¶
func ApplicationSetHasConditions(applicationSetName string, expectedConditions []v1alpha1.ApplicationSetCondition) Expectation
ApplicationSetHasConditions checks whether each of the 'expectedConditions' exist in the ApplicationSet status, and are equivalent to provided values.
func ApplicationsDoNotExist ¶
func ApplicationsDoNotExist(expectedApps []v1alpha1.Application) Expectation
ApplicationsDoNotExist checks that each of the 'expectedApps' no longer exist in the namespace
func ApplicationsExist ¶
func ApplicationsExist(expectedApps []v1alpha1.Application) Expectation
ApplicationsExist checks whether each of the 'expectedApps' exist in the namespace, and are equivalent to provided values.
func Error ¶
func Error(message, err string) Expectation
Error asserts that the last command was an error with substring match
func Pod ¶
func Pod(predicate func(p corev1.Pod) bool) Expectation
Pod checks whether a specified condition is true for any of the pods in the namespace
func Success ¶
func Success(message string) Expectation
Success asserts that the last command was successful