Documentation
¶
Index ¶
- func BeforeSuite()
- func BundleInstalled(ctx context.Context, name, version string) error
- func CatalogIsDeleted(ctx context.Context, catalogName string) error
- func CatalogIsUpdatedToVersion(name, version string) error
- func CatalogServesBundles(ctx context.Context, catalogName string) error
- func CheckFeatureTags(ctx context.Context, sc *godog.Scenario) (context.Context, error)
- func ClusterExtensionIsAvailable(ctx context.Context) error
- func ClusterExtensionIsRemoved(ctx context.Context) error
- func ClusterExtensionIsRolledOut(ctx context.Context) error
- func ClusterExtensionReconciledLatestGeneration(ctx context.Context) error
- func ClusterExtensionReportsActiveRevisions(ctx context.Context, rawRevisionNames string) error
- func ClusterExtensionReportsCondition(ctx context.Context, conditionType, conditionStatus, conditionReason string, ...) error
- func ClusterExtensionReportsConditionTransitionTime(ctx context.Context, conditionType string, minMinutes, maxMinutes int) error
- func ClusterExtensionReportsConditionWithMessageFragment(ctx context.Context, conditionType, conditionStatus, conditionReason string, ...) error
- func ClusterExtensionReportsConditionWithoutMsg(ctx context.Context, conditionType, conditionStatus, conditionReason string) error
- func ClusterExtensionReportsConditionWithoutReason(ctx context.Context, conditionType, conditionStatus string) error
- func ClusterExtensionResourcesCreatedAndAreLabeled(ctx context.Context) error
- func ClusterExtensionResourcesRemoved(ctx context.Context) error
- func ClusterExtensionRevisionHasAnnotationWithValue(ctx context.Context, revisionName, annotationKey string, ...) error
- func ClusterExtensionRevisionHasLabelWithValue(ctx context.Context, revisionName, labelKey, labelValue string) error
- func ClusterExtensionRevisionIsArchived(ctx context.Context, revisionName string) error
- func ClusterExtensionRevisionReportsConditionWithoutMsg(ctx context.Context, ...) error
- func ClusterExtensionVersionUpdate(ctx context.Context, version string) error
- func CreateScenarioContext(ctx context.Context, sc *godog.Scenario) (context.Context, error)
- func MarkTestOperatorNotReady(ctx context.Context, state string) error
- func OLMisAvailable(ctx context.Context) error
- func OperatorTargetNamespace(ctx context.Context, operator, namespace string) error
- func PrometheusMetricsAreReturned(ctx context.Context) error
- func RegisterHooks(sc *godog.ScenarioContext)
- func RegisterSteps(sc *godog.ScenarioContext)
- func ResourceApplyFails(ctx context.Context, errMsg string, yamlTemplate *godog.DocString) error
- func ResourceAvailable(ctx context.Context, resource string) error
- func ResourceEventuallyNotFound(ctx context.Context, resource string) error
- func ResourceIsApplied(ctx context.Context, yamlTemplate *godog.DocString) error
- func ResourceMatches(ctx context.Context, resource string, requiredContentTemplate *godog.DocString) error
- func ResourceRemoved(ctx context.Context, resource string) error
- func ResourceRestored(ctx context.Context, resource string) error
- func ScenarioCleanup(ctx context.Context, _ *godog.Scenario, err error) (context.Context, error)
- func SendMetricsRequest(ctx context.Context, serviceAccount string, endpoint string, ...) error
- func ServiceAccountIsAvailableInNamespace(ctx context.Context, serviceAccount string) error
- func ServiceAccountWithClusterAdminPermissionsIsAvailableInNamespace(ctx context.Context, serviceAccount string) error
- func ServiceAccountWithFetchMetricsPermissions(ctx context.Context, serviceAccount string, controllerName string) error
- func ServiceAccountWithNeededPermissionsIsAvailableInNamespace(ctx context.Context, serviceAccount string) error
- func SetCRDFieldMinValue(_ context.Context, resourceType, jsonPath string, minValue int) error
- func TagCatalogImage(name, oldTag, newTag string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeforeSuite ¶
func BeforeSuite()
func BundleInstalled ¶
BundleInstalled waits for the ClusterExtension to report the specified bundle name and version as installed. Polls with timeout.
func CatalogIsDeleted ¶
CatalogIsDeleted deletes the named ClusterCatalog resource and waits for it to be removed.
func CatalogIsUpdatedToVersion ¶
CatalogIsUpdatedToVersion patches the ClusterCatalog's image reference to the specified version tag.
func CatalogServesBundles ¶
CatalogServesBundles applies the ClusterCatalog YAML template to create a catalog that serves bundles.
func CheckFeatureTags ¶
func ClusterExtensionIsAvailable ¶
ClusterExtensionIsAvailable waits for the ClusterExtension's Installed condition to be True. Polls with timeout.
func ClusterExtensionIsRemoved ¶
ClusterExtensionIsRemoved deletes the current ClusterExtension, saving its state for potential restore checks.
func ClusterExtensionIsRolledOut ¶
ClusterExtensionIsRolledOut waits for the ClusterExtension's Progressing condition to be True with reason Succeeded, then gathers its constituent resources into the scenario context. Polls with timeout.
func ClusterExtensionReconciledLatestGeneration ¶
ClusterExtensionReconciledLatestGeneration waits for the ClusterExtension's observedGeneration to match its metadata generation. Polls with timeout.
func ClusterExtensionReportsActiveRevisions ¶
ClusterExtensionReportsActiveRevisions waits for the ClusterExtension's active revisions to match the expected set of revision names. Polls with timeout.
func ClusterExtensionReportsCondition ¶
func ClusterExtensionReportsCondition(ctx context.Context, conditionType, conditionStatus, conditionReason string, msg *godog.DocString) error
ClusterExtensionReportsCondition waits for the ClusterExtension to have a condition matching the specified type, status, reason, and exact message. Polls with timeout.
func ClusterExtensionReportsConditionTransitionTime ¶
func ClusterExtensionReportsConditionTransitionTime(ctx context.Context, conditionType string, minMinutes, maxMinutes int) error
ClusterExtensionReportsConditionTransitionTime asserts that a condition's lastTransitionTime falls within the specified minute range since the ClusterExtension's creation.
func ClusterExtensionReportsConditionWithMessageFragment ¶
func ClusterExtensionReportsConditionWithMessageFragment(ctx context.Context, conditionType, conditionStatus, conditionReason string, msgFragment *godog.DocString) error
ClusterExtensionReportsConditionWithMessageFragment waits for the ClusterExtension to have a condition matching type, status, and reason, with a message containing the specified fragment. Polls with timeout.
func ClusterExtensionReportsConditionWithoutMsg ¶
func ClusterExtensionReportsConditionWithoutMsg(ctx context.Context, conditionType, conditionStatus, conditionReason string) error
ClusterExtensionReportsConditionWithoutMsg waits for the ClusterExtension to have a condition matching type, status, and reason, without checking the message. Polls with timeout.
func ClusterExtensionReportsConditionWithoutReason ¶
func ClusterExtensionReportsConditionWithoutReason(ctx context.Context, conditionType, conditionStatus string) error
ClusterExtensionReportsConditionWithoutReason waits for the ClusterExtension to have a condition matching type and status, without checking reason or message. Polls with timeout.
func ClusterExtensionResourcesCreatedAndAreLabeled ¶
ClusterExtensionResourcesCreatedAndAreLabeled verifies each constituent resource has the expected OLM owner-kind and owner-name labels. Polls with timeout per resource.
func ClusterExtensionResourcesRemoved ¶
ClusterExtensionResourcesRemoved waits for each previously gathered constituent resource to be deleted. Polls with timeout per resource.
func ClusterExtensionRevisionHasAnnotationWithValue ¶
func ClusterExtensionRevisionHasAnnotationWithValue(ctx context.Context, revisionName, annotationKey string, annotationValue *godog.DocString) error
ClusterExtensionRevisionHasAnnotationWithValue waits for the named ClusterExtensionRevision to have the specified annotation with the expected value. Polls with timeout.
func ClusterExtensionRevisionHasLabelWithValue ¶
func ClusterExtensionRevisionHasLabelWithValue(ctx context.Context, revisionName, labelKey, labelValue string) error
ClusterExtensionRevisionHasLabelWithValue waits for the named ClusterExtensionRevision to have the specified label with the expected value. Polls with timeout.
func ClusterExtensionRevisionIsArchived ¶
ClusterExtensionRevisionIsArchived waits for the named ClusterExtensionRevision to have Progressing=False with reason Archived. Polls with timeout.
func ClusterExtensionRevisionReportsConditionWithoutMsg ¶
func ClusterExtensionRevisionReportsConditionWithoutMsg(ctx context.Context, revisionName, conditionType, conditionStatus, conditionReason string) error
ClusterExtensionRevisionReportsConditionWithoutMsg waits for the named ClusterExtensionRevision to have a condition matching type, status, and reason. Polls with timeout.
func ClusterExtensionVersionUpdate ¶
ClusterExtensionVersionUpdate patches the ClusterExtension's catalog version to the specified value.
func CreateScenarioContext ¶
func MarkTestOperatorNotReady ¶
MarkTestOperatorNotReady controls the test-operator's readiness probe by removing or creating the readiness file in its pod.
func OLMisAvailable ¶
OLMisAvailable waits for the OLM operator-controller deployment to become available. Polls with timeout.
func OperatorTargetNamespace ¶
OperatorTargetNamespace asserts that the operator deployment has the expected olm.targetNamespaces annotation.
func PrometheusMetricsAreReturned ¶
PrometheusMetricsAreReturned validates that each pod's stored metrics response is non-empty and parses as valid Prometheus text format.
func RegisterHooks ¶
func RegisterHooks(sc *godog.ScenarioContext)
func RegisterSteps ¶
func RegisterSteps(sc *godog.ScenarioContext)
func ResourceApplyFails ¶
ResourceApplyFails waits for kubectl apply of the provided YAML to fail with the expected error message. Polls with timeout.
func ResourceAvailable ¶
ResourceAvailable waits for the specified resource (kind/name format) to exist in the test namespace. Polls with timeout.
func ResourceEventuallyNotFound ¶
ResourceEventuallyNotFound waits for the specified resource to be fully deleted from the test namespace. Polls with timeout.
func ResourceIsApplied ¶
ResourceIsApplied applies the provided YAML resource to the cluster and in case of ClusterExtension it captures its name in the test context so that it can be referred to in later steps with ${NAME}
func ResourceMatches ¶
func ResourceMatches(ctx context.Context, resource string, requiredContentTemplate *godog.DocString) error
ResourceMatches waits for the specified resource to match the expected content using JSON merge patch comparison. Polls with timeout.
func ResourceRemoved ¶
ResourceRemoved saves the resource state for potential restore checks, then deletes it from the test namespace.
func ResourceRestored ¶
ResourceRestored waits for a previously removed resource to be re-created with matching spec or data. Polls with timeout.
func ScenarioCleanup ¶
func SendMetricsRequest ¶
func SendMetricsRequest(ctx context.Context, serviceAccount string, endpoint string, controllerName string) error
SendMetricsRequest sets up port-forwarding to the controller's service pods and waits for the metrics endpoint to return a successful response. Stores the response body per pod in the scenario context. Polls with timeout.
func ServiceAccountIsAvailableInNamespace ¶
ServiceAccountIsAvailableInNamespace creates a ServiceAccount in the test namespace without RBAC permissions.
func ServiceAccountWithClusterAdminPermissionsIsAvailableInNamespace ¶
func ServiceAccountWithClusterAdminPermissionsIsAvailableInNamespace(ctx context.Context, serviceAccount string) error
ServiceAccountWithClusterAdminPermissionsIsAvailableInNamespace creates a ServiceAccount and applies cluster-admin RBAC.
func ServiceAccountWithFetchMetricsPermissions ¶
func ServiceAccountWithFetchMetricsPermissions(ctx context.Context, serviceAccount string, controllerName string) error
ServiceAccountWithFetchMetricsPermissions creates a ServiceAccount and applies metrics-reader RBAC for the specified controller.
func ServiceAccountWithNeededPermissionsIsAvailableInNamespace ¶
func ServiceAccountWithNeededPermissionsIsAvailableInNamespace(ctx context.Context, serviceAccount string) error
ServiceAccountWithNeededPermissionsIsAvailableInNamespace creates a ServiceAccount and applies standard RBAC permissions.
func SetCRDFieldMinValue ¶
SetCRDFieldMinValue patches a CRD to set the minimum value for a field. jsonPath is in the format ".spec.fieldName" and gets converted to the CRD schema path.
func TagCatalogImage ¶
TagCatalogImage adds a new tag to a catalog container image in the local registry using crane.
Types ¶
This section is empty.