Documentation
¶
Overview ¶
Package utils implements helper functions for the e2e tests.
Index ¶
- Constants
- func AssertStatusBecomes(t *testing.T, clusterID string, desiredStatus string)
- func AssertStatusBecomesWithin(t *testing.T, clusterID string, desiredStatus string, timeout time.Duration)
- func AssertStatusRemainsFor(t *testing.T, clusterID string, desiredStatus string, timeout time.Duration)
- func CheckContext()
- func CheckGCSObjectEventuallyDeleted(ctx context.Context, t *testing.T, clusterID string)
- func CheckGCSObjectExists(ctx context.Context, clusterID string) (bool, error)
- func DeleteStatusConfigmap(namespace string) error
- func FindInfraPod(ctx context.Context, namespace string, label string) (string, error)
- func GetPodLogs(namespace string, label string, startTime *metav1.Time) (string, error)
- func GetUniqueClusterName(baseName string) string
Constants ¶
const ( // Namespace is the default K8s namespace in which infra server is deployed. Namespace = "infra" // AppLabels are the default K8s labels attached to the infra server deployment. AppLabels = "infra-server" )
Variables ¶
This section is empty.
Functions ¶
func AssertStatusBecomes ¶
AssertStatusBecomes asserts that an infra cluster eventually reaches a desired status.
func AssertStatusBecomesWithin ¶
func AssertStatusBecomesWithin(t *testing.T, clusterID string, desiredStatus string, timeout time.Duration)
AssertStatusBecomesWithin asserts that an infra cluster reaches a desired status within a defined time.
func AssertStatusRemainsFor ¶
func AssertStatusRemainsFor(t *testing.T, clusterID string, desiredStatus string, timeout time.Duration)
AssertStatusRemainsFor asserts that an infra cluster remains in a desired status for a defined time.
func CheckContext ¶
func CheckContext()
CheckContext aborts an execution if the current kubectl context is not an infra-pr cluster.
func CheckGCSObjectEventuallyDeleted ¶
CheckGCSObjectEventuallyDeleted confirms that an object is eventually deletion from the GCS bucket.
func CheckGCSObjectExists ¶
CheckGCSObjectExists confirms that an object exists in the GCS bucket.
func DeleteStatusConfigmap ¶
DeleteStatusConfigmap deletes the configmap named status in a given namespace.
func FindInfraPod ¶
FindInfraPod discovers the infra server pod.
func GetPodLogs ¶
GetPodLogs retrieves the logs for a labeled pod from a given start time.
func GetUniqueClusterName ¶
GetUniqueClusterName adds some uniqueness to a cluster name.
Types ¶
This section is empty.