Documentation ¶
Index ¶
- Constants
- func AfterEachCleanupWithRandomNamespace(randomNamespace, randomReportDir, randomConfigDir string, ...)
- func AllowAuthenticatedUsersRunPrivilegedContainers() error
- func AppendContainersToDeployment(deployment *appsv1.Deployment, containersNum int, image string)
- func AppendContainersToPod(pod *corev1.Pod, containersNum int, image string)
- func AppendLabelsToPod(pod *corev1.Pod, labels map[string]string)
- func ApproveInstallPlan(namespace string, plan *v1alpha1.InstallPlan) error
- func BeforeEachSetupWithRandomNamespace(incomingNamespace string) (randomNamespace, randomReportDir, randomConfigDir string)
- func CleanNamespace(namespace string) error
- func ConvertSpecNameToFileName(specName string) string
- func CopyClaimFileToTcFolder(tcName, formattedTcName, reportDir string)
- func CopyFiles(src string, dst string) error
- func CreateAndWaitUntilDaemonSetIsReady(daemonSet *appsv1.DaemonSet, timeout time.Duration) error
- func CreateAndWaitUntilDeploymentIsReady(deployment *appsv1.Deployment, timeout time.Duration) error
- func CreateAndWaitUntilPVCIsBound(pvc *corev1.PersistentVolumeClaim, timeout time.Duration, pvName string) error
- func CreateAndWaitUntilPodIsReady(pod *corev1.Pod, timeout time.Duration) error
- func CreateAndWaitUntilReplicaSetIsReady(replicaSet *appsv1.ReplicaSet, timeout time.Duration) error
- func CreateAndWaitUntilStatefulSetIsReady(statefulSet *appsv1.StatefulSet, timeout time.Duration) error
- func CreateClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding) error
- func CreateCommunityOperatorsCatalogSource() error
- func CreateInstallPlan(plan *v1alpha1.InstallPlan) error
- func CreateNamespace(namespace string) error
- func CreateNetworkPolicy(networkPolicy *networkingv1.NetworkPolicy, timeout time.Duration) error
- func CreatePersistentVolume(persistentVolume *corev1.PersistentVolume) error
- func CreatePodDisruptionBudget(pdb *policyv1.PodDisruptionBudget, timeout time.Duration) error
- func CreateResourceQuota(quota *corev1.ResourceQuota) error
- func CreateRole(aRole *rbacv1.Role) error
- func CreateRoleBindingWithServiceAccountSubject(...) error
- func CreateRunTimeClass(rtc *nodev1.RuntimeClass) error
- func CreateServiceAccount(serviceAccountName, namespace string) error
- func CreateStorageClass(storageClassName string, defaultSC bool) error
- func CreateSubscription(namespace string, subscription *v1alpha1.Subscription) error
- func DefineCertsuiteConfig(namespaces []string, targetPodLabels []string, targetOperatorLabels []string, ...) error
- func DefineRole(roleName, namespace string) *rbacv1.Role
- func DeleteCatalogSource(name, namespace, displayName string) error
- func DeleteClusterRole(name string) error
- func DeleteClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding) error
- func DeleteClusterRoleBindingByName(name string) error
- func DeleteCustomOperatorSource() error
- func DeleteDeployment(name, namespace string) error
- func DeleteMutatingWebhookConfiguration(name string) error
- func DeleteNamespaceAndWait(namespace string, timeout time.Duration) error
- func DeletePersistentVolume(persistentVolume string, timeout time.Duration) error
- func DeletePersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim) error
- func DeleteRole(roleName, namespace string) error
- func DeleteRoleBinding(roleBindingName, namespace string) error
- func DeleteRunTimeClass(rtc *nodev1.RuntimeClass) error
- func DeleteServiceAccount(serviceAccountName, namespace string) error
- func DeleteStorageClass(storageClassName string) error
- func DeleteSubscription(namespace string, subscriptionName string) error
- func DeleteValidatingWebhookConfiguration(name string) error
- func DeployCustomOperatorSource(image string) error
- func DeployOperator(subscription *v1alpha1.Subscription) error
- func DeployOperatorGroup(namespace string, operatorGroup *olmv1.OperatorGroup) error
- func DeployRHCertifiedOperatorSource(ocpVersion string) error
- func DeployRHOperatorSource(ocpVersion string) error
- func DisableCatalogSource(name string) error
- func EnableCatalogSource(name string) error
- func ExecCommand(pod corev1.Pod, command []string) (bytes.Buffer, error)
- func GenerateDirectories(randomStr string) (reportDir, configDir string)
- func GenerateRandomString(length int) string
- func GetAPIClient() *testclient.ClientSet
- func GetClusterVersion() (string, error)
- func GetConfiguration() *config.Config
- func GetControllerPodFromOperator(namespace, operatorName string) (*corev1.Pod, error)
- func GetDaemonSetPullPolicy(ds *appsv1.DaemonSet) (corev1.PullPolicy, error)
- func GetInstallPlanByCSV(namespace string, csvName string) (*v1alpha1.InstallPlan, error)
- func GetListOfPodsInNamespace(namespace string) (*corev1.PodList, error)
- func GetNumberOfNodes(client corev1Typed.CoreV1Interface) int
- func GetRunningDaemonset(ds *appsv1.DaemonSet) (*appsv1.DaemonSet, error)
- func GetRunningDeployment(namespace, deploymentName string) (*appsv1.Deployment, error)
- func GetRunningPod(namespace, name string) (*corev1.Pod, error)
- func GetRunningStatefulSet(namespace, statefulSetName string) (*appsv1.StatefulSet, error)
- func GetServicesFromNamespace(namespace string) (services []corev1.Service, err error)
- func IsCatalogSourceEnabled(name, namespace, displayName string) (bool, error)
- func IsClusterOvercommitted() (bool, error)
- func IsDeploymentReady(client *egiClients.Settings, namespace, deploymentName string) (bool, error)
- func IsExpectedStatusParamValid(status string) error
- func IsKindCluster() bool
- func IsOperatorGroupInstalled(operatorGroupName, namespace string) error
- func IsPodDisruptionBudgetCreated(pdbName string, namespace string) (bool, error)
- func IsTestCaseFailedInClaimReport(testCaseName string, claimReport claim.Root) (bool, error)
- func IsTestCasePassedInClaimReport(testCaseName string, claimReport claim.Root) (bool, error)
- func IsTestCaseSkippedInClaimReport(testCaseName string, claimReport claim.Root) (bool, error)
- func LaunchTests(testCaseName string, tcNameForReport string, reportDir string, ...) error
- func NamespaceExists(namespace string) (bool, error)
- func NodeHasHugePagesEnabled(node *corev1.Node, resourceName string) bool
- func NodesHaveHugePagesEnabled(resourceName string) bool
- func OpenClaimReport(reportDir string) (*claim.Root, error)
- func QueryPackageManifestForDefaultChannel(operatorName, operatorNamespace string) (string, error)
- func QueryPackageManifestForVersion(operatorName, operatorNamespace, channel string) (string, error)
- func RedefineRoleWithAPIGroups(role *rbacv1.Role, newAPIGroups []string)
- func RedefineRoleWithResources(role *rbacv1.Role, newResources []string)
- func RemoveContentsFromConfigDir(configDir string) error
- func RemoveContentsFromReportDir(reportDir string) error
- func SetTestK8sAPIClient(client kubernetes.Interface)
- func UnsetTestK8sAPIClient()
- func ValidateCatalogSources() error
- func ValidateIfReportsAreValid(tcName string, tcExpectedStatus string, reportDir string) error
- func WaitForNamespaceDeletion(cs corev1Typed.CoreV1Interface, nsName string, timeout time.Duration) error
Constants ¶
const ( ExecutedBy = "QE" AppPwd = "qepwd" PartnerName = "qeuser" )
const (
CatalogSourceNamespace = "openshift-marketplace"
)
Variables ¶
This section is empty.
Functions ¶
func AllowAuthenticatedUsersRunPrivilegedContainers ¶
func AllowAuthenticatedUsersRunPrivilegedContainers() error
AllowAuthenticatedUsersRunPrivilegedContainers adds all authenticated users to privileged group.
func AppendContainersToDeployment ¶
func AppendContainersToDeployment(deployment *appsv1.Deployment, containersNum int, image string)
AppendContainersToDeployment appends containers to a deployment.
func AppendContainersToPod ¶
AppendContainersToPod appends containers to a pod.
func AppendLabelsToPod ¶
AppendLabelsToPod appends labels to given pod manifest. from go documentation : "if you pass a map to a function that changes the contents of the map, the changes will be visible in the caller" - thats the reason for copying the map.
func ApproveInstallPlan ¶
func ApproveInstallPlan(namespace string, plan *v1alpha1.InstallPlan) error
func CleanNamespace ¶
func ConvertSpecNameToFileName ¶
ConvertSpecNameToFileName converts given spec name to file name.
func CopyClaimFileToTcFolder ¶
func CopyClaimFileToTcFolder(tcName, formattedTcName, reportDir string)
func CreateAndWaitUntilDeploymentIsReady ¶
func CreateAndWaitUntilDeploymentIsReady(deployment *appsv1.Deployment, timeout time.Duration) error
CreateAndWaitUntilDeploymentIsReady creates deployment and wait until all deployment replicas are up and running.
func CreateAndWaitUntilPodIsReady ¶
CreateAndWaitUntilPodIsReady creates a pod and waits until all it's containers are ready.
func CreateAndWaitUntilReplicaSetIsReady ¶
func CreateAndWaitUntilReplicaSetIsReady(replicaSet *appsv1.ReplicaSet, timeout time.Duration) error
CreateAndWaitUntilReplicaSetIsReady creates replicaSet and waits until all it's replicas are ready.
func CreateAndWaitUntilStatefulSetIsReady ¶
func CreateAndWaitUntilStatefulSetIsReady(statefulSet *appsv1.StatefulSet, timeout time.Duration) error
CreateAndWaitUntilStatefulSetIsReady creates statefulset and waits until all it's replicas are ready.
func CreateClusterRoleBinding ¶
func CreateClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding) error
CreateClusterRoleBinding creates a cluster role binding.
func CreateCommunityOperatorsCatalogSource ¶
func CreateCommunityOperatorsCatalogSource() error
func CreateInstallPlan ¶
func CreateInstallPlan(plan *v1alpha1.InstallPlan) error
func CreateNamespace ¶
func CreateNetworkPolicy ¶
func CreateNetworkPolicy(networkPolicy *networkingv1.NetworkPolicy, timeout time.Duration) error
func CreatePersistentVolume ¶
func CreatePersistentVolume(persistentVolume *corev1.PersistentVolume) error
CreatePersistentVolume creates a persistent volume.
func CreatePodDisruptionBudget ¶
func CreatePodDisruptionBudget(pdb *policyv1.PodDisruptionBudget, timeout time.Duration) error
CreatPodDisruptionBudget creates Pod Disruption Budget and wait until pdb is created.
func CreateResourceQuota ¶
func CreateResourceQuota(quota *corev1.ResourceQuota) error
func CreateRoleBindingWithServiceAccountSubject ¶
func CreateRoleBindingWithServiceAccountSubject(bindingName, roleName, serviceAccountName, serviceAccountNamespace, namespace string) error
CreateRoleBindingWithServiceAccountSubject creates a role binding with a service account subject.
func CreateRunTimeClass ¶
func CreateRunTimeClass(rtc *nodev1.RuntimeClass) error
func CreateServiceAccount ¶
CreateServiceAccount creates a service account.
func CreateStorageClass ¶
func CreateSubscription ¶
func CreateSubscription(namespace string, subscription *v1alpha1.Subscription) error
CreateSubscription creates a subscription in the given namespace.
func DefineCertsuiteConfig ¶
func DefineCertsuiteConfig(namespaces []string, targetPodLabels []string, targetOperatorLabels []string, certifiedContainerInfo []string, crdFilters []string, configDir string) error
DefineCertsuiteConfig creates certsuite_config.yml file under certsuite config directory.
func DefineRole ¶
func DeleteCatalogSource ¶
func DeleteClusterRole ¶
func DeleteClusterRoleBinding ¶
func DeleteClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding) error
DeleteClusterRoleBinding deletes a cluster role binding.
func DeleteCustomOperatorSource ¶
func DeleteCustomOperatorSource() error
func DeleteDeployment ¶
func DeleteNamespaceAndWait ¶
DeleteAndWait deletes a namespace and waits until delete.
func DeletePersistentVolume ¶
DeletePersistentVolume deletes a persistent volume.
func DeletePersistentVolumeClaim ¶
func DeletePersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim) error
func DeleteRoleBinding ¶
DeleteRoleBinding deletes a role binding.
func DeleteRunTimeClass ¶
func DeleteRunTimeClass(rtc *nodev1.RuntimeClass) error
func DeleteServiceAccount ¶
DeleteServiceAccount deletes a service account.
func DeleteStorageClass ¶
func DeleteSubscription ¶
DeleteSubscription deletes a subscription in the given namespace.
func DeployOperator ¶
func DeployOperator(subscription *v1alpha1.Subscription) error
func DeployOperatorGroup ¶
func DeployOperatorGroup(namespace string, operatorGroup *olmv1.OperatorGroup) error
func DeployRHOperatorSource ¶
func DisableCatalogSource ¶
func EnableCatalogSource ¶
func ExecCommand ¶
ExecCommand runs command in the pod and returns buffer output.
func GenerateDirectories ¶
func GenerateRandomString ¶
func GetAPIClient ¶
func GetAPIClient() *testclient.ClientSet
func GetClusterVersion ¶
func GetConfiguration ¶
func GetDaemonSetPullPolicy ¶
func GetDaemonSetPullPolicy(ds *appsv1.DaemonSet) (corev1.PullPolicy, error)
func GetInstallPlanByCSV ¶
func GetInstallPlanByCSV(namespace string, csvName string) (*v1alpha1.InstallPlan, error)
func GetListOfPodsInNamespace ¶
GetListOfPodsInNamespace returns list of pods for given namespace.
func GetNumberOfNodes ¶
func GetNumberOfNodes(client corev1Typed.CoreV1Interface) int
func GetRunningDaemonset ¶
func GetRunningDeployment ¶
func GetRunningDeployment(namespace, deploymentName string) (*appsv1.Deployment, error)
GetRunningDeployment returns a running deployment.
func GetRunningStatefulSet ¶
func GetRunningStatefulSet(namespace, statefulSetName string) (*appsv1.StatefulSet, error)
func IsCatalogSourceEnabled ¶
func IsClusterOvercommitted ¶
func IsDeploymentReady ¶
func IsDeploymentReady(client *egiClients.Settings, namespace, deploymentName string) (bool, error)
IsDeploymentReady checks if a deployment is ready.
func IsExpectedStatusParamValid ¶
IsExpectedStatusParamValid validates if requested test status is valid.
func IsKindCluster ¶
func IsKindCluster() bool
Returns true if the cluster is of kind type, otherwise false. Performance gains are achievable by invoking the command once, leveraging a synchronization mechanism like sync.Once.
func IsPodDisruptionBudgetCreated ¶
IsPodDisruptionBudgetCreated checks if a pod disruption budget is created.
func IsTestCaseFailedInClaimReport ¶
IsTestCaseFailedInClaimReport test if test case is failed as expected in claim.json file.
func IsTestCasePassedInClaimReport ¶
IsTestCasePassedInClaimReport tests if test case is passed as expected in claim.json file.
func IsTestCaseSkippedInClaimReport ¶
IsTestCaseSkippedInClaimReport test if test case is failed as expected in claim.json file.
func LaunchTests ¶
func LaunchTests(testCaseName string, tcNameForReport string, reportDir string, configDir string) error
LaunchTests stats tests based on given parameters.
func NamespaceExists ¶
func NodeHasHugePagesEnabled ¶
func OpenClaimReport ¶
OpenClaimReport opens claim.json file and returns struct.
func QueryPackageManifestForVersion ¶
func QueryPackageManifestForVersion(operatorName, operatorNamespace, channel string) (string, error)
QueryPackageManifest queries the package manifest for the operator.
func RemoveContentsFromReportDir ¶
RemoveContentsFromReportDir removes all files from report dir.
func SetTestK8sAPIClient ¶
func SetTestK8sAPIClient(client kubernetes.Interface)
func UnsetTestK8sAPIClient ¶
func UnsetTestK8sAPIClient()
func ValidateCatalogSources ¶
func ValidateCatalogSources() error
func ValidateIfReportsAreValid ¶
ValidateIfReportsAreValid test if report is valid for given test case.
func WaitForNamespaceDeletion ¶
func WaitForNamespaceDeletion(cs corev1Typed.CoreV1Interface, nsName string, timeout time.Duration) error
WaitForDeletion waits until the namespace will be removed from the cluster.
Types ¶
This section is empty.
Source Files ¶
- catalogsources.go
- clusterrolebindings.go
- clusterroles.go
- daemonset.go
- deployment.go
- helper.go
- init.go
- installplans.go
- mutatingwebhook.go
- namespaces.go
- networkpolicy.go
- nodes.go
- operator.go
- packagemanifest.go
- pod.go
- poddisruptionbudget.go
- rbac.go
- replicaset.go
- reporthelper.go
- resourcequotas.go
- runhelper.go
- runtimeclass.go
- services.go
- statefulset.go
- storageclasses.go
- subscription.go
- validatingwebhook.go