Documentation
¶
Index ¶
- Constants
- func ApplicationHealthStatus(appname string, namespace string) error
- func ApplicationSyncStatus(appname string, namespace string) error
- func DeleteNamespace(k8sClient client.Client, nsToDelete string) error
- func EnsureCleanSlate(k8sClient client.Client) error
- func ProjectExists(projectName string, namespace string) (bool, error)
- func WaitForResourcesByName(k8sClient client.Client, resourceList []ResourceList, namespace string, ...) error
- type ResourceList
Constants ¶
const (
StandaloneArgoCDNamespace = "gitops-standalone-test"
)
Variables ¶
This section is empty.
Functions ¶
func ApplicationHealthStatus ¶
ApplicationHealthStatus returns an error if the application is not 'Healthy'
func ApplicationSyncStatus ¶
ApplicationSyncStatus returns an error if the application is not 'Synced'
func DeleteNamespace ¶
DeleteNamespace deletes a namespace, and waits for deletion to complete.
func EnsureCleanSlate ¶
EnsureCleanSlate runs before the tests, to ensure that the cluster is in the expected pre-test state
func ProjectExists ¶
ProjectExists return true if the AppProject exists in the namespace, false otherwise (with an error, if available).
func WaitForResourcesByName ¶
func WaitForResourcesByName(k8sClient client.Client, resourceList []ResourceList, namespace string, timeout time.Duration) error
WaitForResourcesByName will wait up to 'timeout' minutes for a set of resources to exist; the resources should be of the given type (Deployment, Service, etc) and name(s). Returns error if the resources could not be found within the given time frame.
Types ¶
type ResourceList ¶
type ResourceList struct { // resource is the type of resource to verify that it exists Resource client.Object // expectedResources are the names of the resources of the above type ExpectedResources []string }
ResourceList is used by waitForResourcesByName