From c7c79451109dddaa4a7c4f08d3585f5cb2dbaaa4 Mon Sep 17 00:00:00 2001 From: Brandon Palm Date: Tue, 11 Nov 2025 15:35:06 -0600 Subject: [PATCH] Experiment with minikube QE run --- .github/workflows/qe-minikube.yml | 177 ++++++++++++++++++ ...cess_control_container_non-root_user_id.go | 4 +- .../tests/access_control_crd_roles.go | 2 +- .../tests/access_control_security_context.go | 4 +- ...ccess_control_sys_nice_capability_check.go | 6 +- .../affiliated_certification_suite_test.go | 4 +- ...ification_container_is_certified_digest.go | 2 +- .../affiliated_certification_helm_version.go | 2 +- .../affiliated_certification_operator.go | 2 +- .../affillated_certification_helm_chart.go | 2 +- tests/globalhelper/helper.go | 17 ++ .../tests/lifecycle_cpu_isolation.go | 2 +- .../lifecycle/tests/lifecycle_crd_scaling.go | 2 +- .../tests/lifecycle_pod_high_availability.go | 2 +- .../tests/lifecycle_pod_recreation.go | 2 +- .../tests/lifecycle_statefulset_scaling.go | 2 +- .../networking_dpdk_cpu_pinning_exec_probe.go | 2 +- .../observability/tests/container_logging.go | 8 +- tests/operator/operator_suite_test.go | 4 +- .../performance/tests/exclusive_cpu_pools.go | 4 +- .../tests/platform_alteration_base_image.go | 2 +- .../tests/platform_alteration_boot_params.go | 2 +- ...form_alteration_cluster_operator_health.go | 2 +- .../tests/platform_alteration_hugepages_1g.go | 2 +- .../tests/platform_alteration_hugepages_2m.go | 2 +- .../platform_alteration_hugepages_config.go | 2 +- ...latform_alteration_is_selinux_enforcing.go | 4 +- .../platform_alteration_ocp_lifecycle.go | 2 +- .../tests/platform_alteration_ocp_node_os.go | 2 +- .../tests/platform_alteration_service_mesh.go | 10 +- .../platform_alteration_sysctl_config.go | 2 +- ...platform_alteration_tainted_node_kernel.go | 2 +- 32 files changed, 239 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/qe-minikube.yml diff --git a/.github/workflows/qe-minikube.yml b/.github/workflows/qe-minikube.yml new file mode 100644 index 000000000..a360e04c7 --- /dev/null +++ b/.github/workflows/qe-minikube.yml @@ -0,0 +1,177 @@ +--- +name: QE Testing (Minikube) + +on: + pull_request: + branches: [ main ] + paths: + - 'tests/**' + - 'go.mod' + - 'go.sum' + - '.github/workflows/qe-ocp.yml' + - '.github/workflows/qe-minikube.yml' + workflow_dispatch: + # Schedule a daily cron at midnight UTC + schedule: + - cron: '0 0 * * *' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +env: + TEST_REPO: redhat-best-practices-for-k8s/certsuite + CERTSUITE_REF: main + +jobs: + # Build and store the certsuite binary + build-and-store-binary: + runs-on: ubuntu-24.04 + steps: + - name: Check out code + uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 + with: + ref: ${{ github.sha }} + + - name: Set up Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version-file: go.mod + + - name: Clone the certsuite repository + uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 + with: + repository: ${{ env.TEST_REPO }} + path: certsuite + ref: ${{ env.CERTSUITE_REF }} + + - name: Extract dependent Pull Requests + uses: depends-on/depends-on-action@61cb3f4a0e2c8ae4b90c9448dc57c7ba9ca24c35 # main + with: + token: ${{ secrets.GITHUB_TOKEN }} + extra-dirs: certsuite + + - name: Build the certsuite binary + run: make build-certsuite-tool + working-directory: certsuite + + - name: Upload certsuite binary as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + with: + name: certsuite-binary + path: certsuite/certsuite + retention-days: 1 + + qe-testing-minikube: + needs: [build-and-store-binary] + if: ${{ needs.build-and-store-binary.result == 'success' }} + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + suite: [accesscontrol, affiliatedcertification, manageability, networking, lifecycle, performance, platformalteration, observability, operator] + env: + SHELL: /bin/bash + KUBECONFIG: '/home/runner/.kube/config' + PFLT_DOCKERCONFIG: '/home/runner/.docker/config' + TEST_CERTSUITE_IMAGE_NAME: quay.io/redhat-best-practices-for-k8s/certsuite + TEST_CERTSUITE_IMAGE_TAG: localtest + DOCKER_CONFIG_DIR: '/home/runner/.docker/' + SKIP_PRELOAD_IMAGES: true # Not needed for github-hosted runs + + steps: + - name: Write temporary docker file + run: | + mkdir -p /home/runner/.docker + touch ${PFLT_DOCKERCONFIG} + echo '{ "auths": {} }' >> ${PFLT_DOCKERCONFIG} + + - name: Check out code + uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 + with: + ref: ${{ github.sha }} + + - name: Set up Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version-file: go.mod + + - name: Disable default go problem matcher + run: echo "::remove-matcher owner=go::" + + - name: Check out `certsuite-sample-workload` + uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 + with: + repository: redhat-best-practices-for-k8s/certsuite-sample-workload + path: certsuite-sample-workload + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y python3-pip + + - name: Setup minikube k8s cluster + uses: palmsoftware/quick-k8s@v0.0.42 + with: + clusterProvider: minikube + disableDefaultCni: true + numControlPlaneNodes: 1 + numWorkerNodes: 2 + installOLM: true + removeDefaultStorageClass: true + removeControlPlaneTaint: true + + - name: Install partner resources + run: python3 -m venv .venv; source .venv/bin/activate; pip install --upgrade pip; pip install jinjanator; cp .venv/bin/jinjanate .venv/bin/j2; make install-for-qe + working-directory: certsuite-sample-workload + + - name: Show pods + run: oc get pods -A + + - name: Wait for all pods to be ready + run: ./scripts/wait-for-all-pods-running.sh + working-directory: certsuite-sample-workload + timeout-minutes: 10 + + - name: Clone the certsuite repository + uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 + with: + repository: ${{ env.TEST_REPO }} + path: certsuite + ref: ${{ env.CERTSUITE_REF }} + + - name: Extract dependent Pull Requests + uses: depends-on/depends-on-action@61cb3f4a0e2c8ae4b90c9448dc57c7ba9ca24c35 # main + with: + token: ${{ secrets.GITHUB_TOKEN }} + extra-dirs: certsuite-sample-workload certsuite + + - name: Download pre-built certsuite binary + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + name: certsuite-binary + path: certsuite/ + + - name: Make binary executable + run: chmod +x certsuite/certsuite + + # Only run against the binary during a scheduled run + - name: Run the tests (against binary) + uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 + with: + timeout_minutes: 150 + max_attempts: 3 + command: FEATURES=${{matrix.suite}} CERTSUITE_REPO_PATH=${GITHUB_WORKSPACE}/certsuite USE_BINARY=true DISABLE_INTRUSIVE_TESTS=true ENABLE_PARALLEL=true ENABLE_FLAKY_RETRY=true JOB_ID=${{github.run_id}} make test-features + + check-all-dependencies-are-merged: + runs-on: ubuntu-24.04 + steps: + + - name: Extract dependent PR + uses: depends-on/depends-on-action@61cb3f4a0e2c8ae4b90c9448dc57c7ba9ca24c35 # main + with: + token: ${{ secrets.GITHUB_TOKEN }} + check-unmerged-pr: true + +... + diff --git a/tests/accesscontrol/tests/access_control_container_non-root_user_id.go b/tests/accesscontrol/tests/access_control_container_non-root_user_id.go index 6b59214aa..dbe37e2b6 100644 --- a/tests/accesscontrol/tests/access_control_container_non-root_user_id.go +++ b/tests/accesscontrol/tests/access_control_container_non-root_user_id.go @@ -39,7 +39,7 @@ var _ = Describe("Access-control non-root user,", func() { // 56427 It("one deployment, one pod, does not have securityContext RunAsUser 0", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { // This test case deploys a pod without any securityContext fields in both pod and container level. In OCP, // the most restrictive SecurityContextConstraint resource will be selected, making those fields to be automatically // set with the appropriate values. In kind clusters, there's no SCC so both fields will be kept as nil, which makes @@ -106,7 +106,7 @@ var _ = Describe("Access-control non-root user,", func() { // 56429 It("two deployments, one pod each, does not have securityContext RunAsUser 0", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { // This test case deploys a pod without any securityContext fields in both pod and container level. In OCP, // the most restrictive SecurityContextConstraint resource will be selected, making those fields to be automatically // set with the appropriate values. In kind clusters, there's no SCC so both fields will be kept as nil, which makes diff --git a/tests/accesscontrol/tests/access_control_crd_roles.go b/tests/accesscontrol/tests/access_control_crd_roles.go index 39289884e..6d6186fbe 100644 --- a/tests/accesscontrol/tests/access_control_crd_roles.go +++ b/tests/accesscontrol/tests/access_control_crd_roles.go @@ -19,7 +19,7 @@ var _ = Describe("access-control-crd-roles", Serial, func() { var randomCertsuiteConfigDir string BeforeEach(func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { By("Make masters schedulable") err := nodes.EnableMasterScheduling(globalhelper.GetAPIClient().K8sClient.CoreV1().Nodes(), true) Expect(err).ToNot(HaveOccurred()) diff --git a/tests/accesscontrol/tests/access_control_security_context.go b/tests/accesscontrol/tests/access_control_security_context.go index 2ff866129..51fb56a86 100644 --- a/tests/accesscontrol/tests/access_control_security_context.go +++ b/tests/accesscontrol/tests/access_control_security_context.go @@ -40,7 +40,7 @@ var _ = Describe("Access-control security-context,", func() { // 63736 It("one deployment, one pod, one container, has allowed security context", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Skip on kind cluster") } @@ -102,7 +102,7 @@ var _ = Describe("Access-control security-context,", func() { // 63738 It("two deployments, one pod each, one container each, both have allowed security context", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Skip on kind cluster") } diff --git a/tests/accesscontrol/tests/access_control_sys_nice_capability_check.go b/tests/accesscontrol/tests/access_control_sys_nice_capability_check.go index 194ed95be..bc1d55c65 100644 --- a/tests/accesscontrol/tests/access_control_sys_nice_capability_check.go +++ b/tests/accesscontrol/tests/access_control_sys_nice_capability_check.go @@ -47,7 +47,7 @@ var _ = Describe("Access-control sys-nice_capability", Ordered, Serial, Label("r } // Skip all if running in a kind cluster - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { skipTestSuite = true Skip("Kind cluster detected") } @@ -449,7 +449,7 @@ var _ = Describe("Access-control sys-nice_capability check, non-realtime kernel" pod := &podList.Items[0] By("Ensure pod " + pod.Name + " has not added SYS_NICE cap") - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Expect(pod.Spec.Containers[0].SecurityContext).To(BeNil()) Expect(pod.Spec.Containers[1].SecurityContext).To(BeNil()) } else { @@ -459,7 +459,7 @@ var _ = Describe("Access-control sys-nice_capability check, non-realtime kernel" pod = &podList.Items[1] By("Ensure pod " + pod.Name + " has not added SYS_NICE cap") - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Expect(pod.Spec.Containers[0].SecurityContext).To(BeNil()) Expect(pod.Spec.Containers[1].SecurityContext).To(BeNil()) } else { diff --git a/tests/affiliatedcertification/affiliated_certification_suite_test.go b/tests/affiliatedcertification/affiliated_certification_suite_test.go index a97a5e0a6..7ed36d353 100644 --- a/tests/affiliatedcertification/affiliated_certification_suite_test.go +++ b/tests/affiliatedcertification/affiliated_certification_suite_test.go @@ -37,7 +37,7 @@ var isCloudCasaAlreadyLabeled bool var _ = SynchronizedBeforeSuite(func() { - if !globalhelper.IsKindCluster() { + if !globalhelper.IsVanillaK8sCluster() { // Always install Helm v3 right before running the suite By("Install helm v3") cmd := exec.Command("/bin/bash", "-c", @@ -88,7 +88,7 @@ var _ = SynchronizedBeforeSuite(func() { Expect(err).ToNot(HaveOccurred()) } - if !globalhelper.IsKindCluster() { + if !globalhelper.IsVanillaK8sCluster() { By("Ensure openshift-marketplace namespace exists") err = globalhelper.CreateNamespace("openshift-marketplace") Expect(err).ToNot(HaveOccurred()) diff --git a/tests/affiliatedcertification/tests/affiliated_certification_container_is_certified_digest.go b/tests/affiliatedcertification/tests/affiliated_certification_container_is_certified_digest.go index 6f8799db0..665b8883e 100644 --- a/tests/affiliatedcertification/tests/affiliated_certification_container_is_certified_digest.go +++ b/tests/affiliatedcertification/tests/affiliated_certification_container_is_certified_digest.go @@ -19,7 +19,7 @@ var _ = Describe("Affiliated-certification container-is-certified-digest,", Seri var randomCertsuiteConfigDir string BeforeEach(func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Skip test due to image pull missing credentials in Kind") } diff --git a/tests/affiliatedcertification/tests/affiliated_certification_helm_version.go b/tests/affiliatedcertification/tests/affiliated_certification_helm_version.go index 9d3edb0ca..3a6d41a34 100644 --- a/tests/affiliatedcertification/tests/affiliated_certification_helm_version.go +++ b/tests/affiliatedcertification/tests/affiliated_certification_helm_version.go @@ -16,7 +16,7 @@ var _ = Describe("Affiliated-certification helm-version,", Serial, func() { var randomCertsuiteConfigDir string BeforeEach(func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Skipping helm version test on Kind cluster") } diff --git a/tests/affiliatedcertification/tests/affiliated_certification_operator.go b/tests/affiliatedcertification/tests/affiliated_certification_operator.go index a04bd80d1..9b4ffbb30 100644 --- a/tests/affiliatedcertification/tests/affiliated_certification_operator.go +++ b/tests/affiliatedcertification/tests/affiliated_certification_operator.go @@ -32,7 +32,7 @@ var _ = Describe("Affiliated-certification operator certification,", Serial, fun tsparams.TestCertificationNameSpace) // If Kind cluster, skip. - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("This test is not supported on Kind cluster") } diff --git a/tests/affiliatedcertification/tests/affillated_certification_helm_chart.go b/tests/affiliatedcertification/tests/affillated_certification_helm_chart.go index d7ea513c8..ac97c839d 100644 --- a/tests/affiliatedcertification/tests/affillated_certification_helm_chart.go +++ b/tests/affiliatedcertification/tests/affillated_certification_helm_chart.go @@ -17,7 +17,7 @@ var _ = Describe("Affiliated-certification helm chart certification,", Serial, f var randomCertsuiteConfigDir string BeforeEach(func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Skipping helm chart test on Kind cluster") } diff --git a/tests/globalhelper/helper.go b/tests/globalhelper/helper.go index 5007be27c..7cf080331 100644 --- a/tests/globalhelper/helper.go +++ b/tests/globalhelper/helper.go @@ -366,6 +366,23 @@ func IsKindCluster() bool { return cmd.Run() == nil } +// Returns true if the cluster is a minikube cluster, otherwise false. +func IsMinikubeCluster() bool { + cmd := exec.CommandContext(context.TODO(), + "oc", + "cluster-info", "--context", "minikube", + ">/dev/null", "2>&1") + + return cmd.Run() == nil +} + +// Returns true if the cluster is a vanilla Kubernetes cluster (Kind or Minikube), +// otherwise false. This is useful for skipping OpenShift-specific tests that +// require features like SecurityContextConstraints, OCP lifecycle, etc. +func IsVanillaK8sCluster() bool { + return IsKindCluster() || IsMinikubeCluster() +} + // Returns true if the cluster is a CRC (Code Ready Containers) cluster, otherwise false. // CRC clusters are typically single-node OpenShift clusters used for development. func IsCRCCluster() bool { diff --git a/tests/lifecycle/tests/lifecycle_cpu_isolation.go b/tests/lifecycle/tests/lifecycle_cpu_isolation.go index 403bd19c7..d364ff58b 100644 --- a/tests/lifecycle/tests/lifecycle_cpu_isolation.go +++ b/tests/lifecycle/tests/lifecycle_cpu_isolation.go @@ -37,7 +37,7 @@ var _ = Describe("lifecycle-cpu-isolation", Serial, func() { []string{}, randomCertsuiteConfigDir) Expect(err).ToNot(HaveOccurred()) - if globalhelper.IsKindCluster() && runtime.NumCPU() <= 2 { + if globalhelper.IsVanillaK8sCluster() && runtime.NumCPU() <= 2 { Skip("This test requires more than 2 CPU cores") } }) diff --git a/tests/lifecycle/tests/lifecycle_crd_scaling.go b/tests/lifecycle/tests/lifecycle_crd_scaling.go index 94db766ef..95d9fa4eb 100644 --- a/tests/lifecycle/tests/lifecycle_crd_scaling.go +++ b/tests/lifecycle/tests/lifecycle_crd_scaling.go @@ -22,7 +22,7 @@ var _ = Describe("lifecycle-crd-scaling", Serial, func() { var randomCertsuiteConfigDir string BeforeEach(func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { By("Make masters schedulable") err := nodes.EnableMasterScheduling(globalhelper.GetAPIClient().Nodes(), true) Expect(err).ToNot(HaveOccurred()) diff --git a/tests/lifecycle/tests/lifecycle_pod_high_availability.go b/tests/lifecycle/tests/lifecycle_pod_high_availability.go index 8808382ef..b8abbdb9e 100644 --- a/tests/lifecycle/tests/lifecycle_pod_high_availability.go +++ b/tests/lifecycle/tests/lifecycle_pod_high_availability.go @@ -19,7 +19,7 @@ var _ = Describe("lifecycle-pod-high-availability", Serial, func() { var randomCertsuiteConfigDir string BeforeEach(func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { By("Make masters schedulable") err := nodes.EnableMasterScheduling(globalhelper.GetAPIClient().Nodes(), true) Expect(err).ToNot(HaveOccurred()) diff --git a/tests/lifecycle/tests/lifecycle_pod_recreation.go b/tests/lifecycle/tests/lifecycle_pod_recreation.go index 8343b951e..31d02ef29 100644 --- a/tests/lifecycle/tests/lifecycle_pod_recreation.go +++ b/tests/lifecycle/tests/lifecycle_pod_recreation.go @@ -26,7 +26,7 @@ var _ = Describe("lifecycle-pod-recreation", Serial, func() { err := os.Setenv("CERTSUITE_NON_INTRUSIVE_ONLY", "false") Expect(err).ToNot(HaveOccurred()) - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { By("Make masters schedulable") err := nodes.EnableMasterScheduling(globalhelper.GetAPIClient().Nodes(), true) Expect(err).ToNot(HaveOccurred()) diff --git a/tests/lifecycle/tests/lifecycle_statefulset_scaling.go b/tests/lifecycle/tests/lifecycle_statefulset_scaling.go index 2473463ff..57fcb9b0a 100644 --- a/tests/lifecycle/tests/lifecycle_statefulset_scaling.go +++ b/tests/lifecycle/tests/lifecycle_statefulset_scaling.go @@ -25,7 +25,7 @@ var _ = Describe("lifecycle-statefulset-scaling", Serial, func() { err := os.Setenv("CERTSUITE_NON_INTRUSIVE_ONLY", "false") Expect(err).ToNot(HaveOccurred()) - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { By("Make masters schedulable") err := nodes.EnableMasterScheduling(globalhelper.GetAPIClient().Nodes(), true) Expect(err).ToNot(HaveOccurred()) diff --git a/tests/networking/tests/networking_dpdk_cpu_pinning_exec_probe.go b/tests/networking/tests/networking_dpdk_cpu_pinning_exec_probe.go index b95eab5a2..421a47498 100644 --- a/tests/networking/tests/networking_dpdk_cpu_pinning_exec_probe.go +++ b/tests/networking/tests/networking_dpdk_cpu_pinning_exec_probe.go @@ -35,7 +35,7 @@ var _ = Describe("Networking dpdk-cpu-pinning-exec-probe,", func() { []string{}, randomCertsuiteConfigDir) Expect(err).ToNot(HaveOccurred()) - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("DPDK is not supported on Kind cluster. Skipping.") } diff --git a/tests/observability/tests/container_logging.go b/tests/observability/tests/container_logging.go index 6387cb085..04ca0d69f 100644 --- a/tests/observability/tests/container_logging.go +++ b/tests/observability/tests/container_logging.go @@ -120,7 +120,7 @@ var _ = Describe(tsparams.CertsuiteContainerLoggingTcName, func() { // 51755 It("One daemonset with two containers, first prints two lines, the second one line", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Test skipped on KIND cluster due to newline char issue") } @@ -152,7 +152,7 @@ var _ = Describe(tsparams.CertsuiteContainerLoggingTcName, func() { // 51756 It("Two deployments, two pods with two containers each, all printing 1 log line", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Test skipped on KIND cluster due to newline char issue") } @@ -451,7 +451,7 @@ var _ = Describe(tsparams.CertsuiteContainerLoggingTcName, func() { // 51765 It("One deployment one pod one container printing one log line without newline char", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Test skipped on KIND cluster due to newline char issue") } @@ -483,7 +483,7 @@ var _ = Describe(tsparams.CertsuiteContainerLoggingTcName, func() { // 51767 It("One deployment one pod two containers, first prints one line, second prints "+ "one line without newline", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Test skipped on KIND cluster due to newline char issue") } diff --git a/tests/operator/operator_suite_test.go b/tests/operator/operator_suite_test.go index 312da1454..09f6429f3 100644 --- a/tests/operator/operator_suite_test.go +++ b/tests/operator/operator_suite_test.go @@ -27,12 +27,12 @@ func TestOperator(t *testing.T) { var _ = SynchronizedBeforeSuite(func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Skipping operator tests on kind cluster") } // Safeguard against running the operator tests on a cluster without catalog sources - if !globalhelper.IsKindCluster() { + if !globalhelper.IsVanillaK8sCluster() { By("Create community-operators catalog source") err := globalhelper.CreateCommunityOperatorsCatalogSource() Expect(err).ToNot(HaveOccurred()) diff --git a/tests/performance/tests/exclusive_cpu_pools.go b/tests/performance/tests/exclusive_cpu_pools.go index d708e26b5..999f8bdff 100644 --- a/tests/performance/tests/exclusive_cpu_pools.go +++ b/tests/performance/tests/exclusive_cpu_pools.go @@ -37,7 +37,7 @@ var _ = Describe("performance-exclusive-cpu-pool", func() { err = tshelper.ConfigurePrivilegedServiceAccount(randomNamespace) Expect(err).ToNot(HaveOccurred()) - if globalhelper.IsKindCluster() && runtime.NumCPU() <= 2 { + if globalhelper.IsVanillaK8sCluster() && runtime.NumCPU() <= 2 { Skip("This test requires more than 2 CPU cores") } }) @@ -48,7 +48,7 @@ var _ = Describe("performance-exclusive-cpu-pool", func() { }) It("One pod with only exclusive containers", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { // We cannot guarantee the number of available CPUs so we skip this test Skip("Exclusive CPU pool is not supported on Kind cluster, skipping...") } diff --git a/tests/platformalteration/tests/platform_alteration_base_image.go b/tests/platformalteration/tests/platform_alteration_base_image.go index ff43e286b..0fa9bcacf 100644 --- a/tests/platformalteration/tests/platform_alteration_base_image.go +++ b/tests/platformalteration/tests/platform_alteration_base_image.go @@ -35,7 +35,7 @@ var _ = Describe("platform-alteration-base-image", func() { []string{}, randomCertsuiteConfigDir) Expect(err).ToNot(HaveOccurred()) - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { // The Certsuite actually proactively skips this test if the cluster is Non-OCP. Skip(fmt.Sprintf("%s test is not applicable for Kind cluster", tsparams.CertsuiteBaseImageName)) } diff --git a/tests/platformalteration/tests/platform_alteration_boot_params.go b/tests/platformalteration/tests/platform_alteration_boot_params.go index 87d07e01b..f455169ae 100644 --- a/tests/platformalteration/tests/platform_alteration_boot_params.go +++ b/tests/platformalteration/tests/platform_alteration_boot_params.go @@ -35,7 +35,7 @@ var _ = Describe("platform-alteration-boot-params", func() { Expect(err).ToNot(HaveOccurred()) By("If Kind cluster, skip") - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Kind cluster does not support MCO") } }) diff --git a/tests/platformalteration/tests/platform_alteration_cluster_operator_health.go b/tests/platformalteration/tests/platform_alteration_cluster_operator_health.go index 714946c2f..a061be818 100644 --- a/tests/platformalteration/tests/platform_alteration_cluster_operator_health.go +++ b/tests/platformalteration/tests/platform_alteration_cluster_operator_health.go @@ -30,7 +30,7 @@ var _ = Describe("platform-alteration-cluster-operator-health", func() { Expect(err).ToNot(HaveOccurred()) By("If Kind cluster, skip") - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Kind cluster does not have cluster operators") } }) diff --git a/tests/platformalteration/tests/platform_alteration_hugepages_1g.go b/tests/platformalteration/tests/platform_alteration_hugepages_1g.go index b57b1cbf7..143a395d0 100644 --- a/tests/platformalteration/tests/platform_alteration_hugepages_1g.go +++ b/tests/platformalteration/tests/platform_alteration_hugepages_1g.go @@ -31,7 +31,7 @@ var _ = Describe("platform-alteration-hugepages-1g-only", Serial, func() { []string{}, randomCertsuiteConfigDir) Expect(err).ToNot(HaveOccurred()) - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Hugepages are not supported in Kind clusters") } diff --git a/tests/platformalteration/tests/platform_alteration_hugepages_2m.go b/tests/platformalteration/tests/platform_alteration_hugepages_2m.go index 7ddc21927..3555dbfc1 100644 --- a/tests/platformalteration/tests/platform_alteration_hugepages_2m.go +++ b/tests/platformalteration/tests/platform_alteration_hugepages_2m.go @@ -31,7 +31,7 @@ var _ = Describe("platform-alteration-hugepages-2m-only", Serial, func() { []string{}, randomCertsuiteConfigDir) Expect(err).ToNot(HaveOccurred()) - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Hugepages are not supported in Kind clusters") } diff --git a/tests/platformalteration/tests/platform_alteration_hugepages_config.go b/tests/platformalteration/tests/platform_alteration_hugepages_config.go index 6a699109f..c5a811253 100644 --- a/tests/platformalteration/tests/platform_alteration_hugepages_config.go +++ b/tests/platformalteration/tests/platform_alteration_hugepages_config.go @@ -34,7 +34,7 @@ var _ = Describe("platform-alteration-hugepages-config", Serial, func() { []string{}, randomCertsuiteConfigDir) Expect(err).ToNot(HaveOccurred()) - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Hugepages are not supported in Kind clusters") } }) diff --git a/tests/platformalteration/tests/platform_alteration_is_selinux_enforcing.go b/tests/platformalteration/tests/platform_alteration_is_selinux_enforcing.go index 27fdaff1b..ab15cd90d 100644 --- a/tests/platformalteration/tests/platform_alteration_is_selinux_enforcing.go +++ b/tests/platformalteration/tests/platform_alteration_is_selinux_enforcing.go @@ -32,7 +32,7 @@ var _ = Describe("platform-alteration-is-selinux-enforcing", func() { Expect(err).ToNot(HaveOccurred()) By("If Kind cluster, skip") - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Kind cluster does not support SELinux") } }) @@ -81,7 +81,7 @@ var _ = Describe("platform-alteration-is-selinux-enforcing", func() { // 51311 It("SELinux is permissive on one node [negative]", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Kind cluster does not support SELinux") } diff --git a/tests/platformalteration/tests/platform_alteration_ocp_lifecycle.go b/tests/platformalteration/tests/platform_alteration_ocp_lifecycle.go index bdcf98923..2aaf531a3 100644 --- a/tests/platformalteration/tests/platform_alteration_ocp_lifecycle.go +++ b/tests/platformalteration/tests/platform_alteration_ocp_lifecycle.go @@ -49,7 +49,7 @@ var _ = Describe("platform-alteration-ocp-lifecycle", func() { }) It("OCP version should be supported", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("OCP version is not applicable for Kind cluster") } diff --git a/tests/platformalteration/tests/platform_alteration_ocp_node_os.go b/tests/platformalteration/tests/platform_alteration_ocp_node_os.go index cd32a5f4a..575c06383 100644 --- a/tests/platformalteration/tests/platform_alteration_ocp_node_os.go +++ b/tests/platformalteration/tests/platform_alteration_ocp_node_os.go @@ -36,7 +36,7 @@ var _ = Describe("platform-alteration-ocp-node-os", func() { }) It("Nodes OS should be compatible with OCP version", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("OCP version is not applicable for Kind cluster") } diff --git a/tests/platformalteration/tests/platform_alteration_service_mesh.go b/tests/platformalteration/tests/platform_alteration_service_mesh.go index 6d1207f36..48ea381d8 100644 --- a/tests/platformalteration/tests/platform_alteration_service_mesh.go +++ b/tests/platformalteration/tests/platform_alteration_service_mesh.go @@ -32,7 +32,7 @@ var _ = Describe("platform-alteration-service-mesh-usage-installed", Ordered, fu if _, exists := os.LookupEnv("NON_LINUX_ENV"); !exists { By("Install istio") //nolint:goconst - cmd := exec.Command("/bin/bash", "-c", "curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.24.1 sh - "+ + cmd := exec.Command("/bin/bash", "-c", "curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.28.0 sh - "+ "&& istio-1.24.1/bin/istioctl install --set profile=demo -y --set hub=gcr.io/istio-release") err := cmd.Run() Expect(err).ToNot(HaveOccurred(), "Error installing istio") @@ -42,7 +42,7 @@ var _ = Describe("platform-alteration-service-mesh-usage-installed", Ordered, fu AfterAll(func() { if _, exists := os.LookupEnv("NON_LINUX_ENV"); !exists { By("Uninstall istio") - cmd := exec.Command("/bin/bash", "-c", "curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.24.1 sh - "+ + cmd := exec.Command("/bin/bash", "-c", "curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.28.0 sh - "+ "&& istio-1.24.1/bin/istioctl uninstall -y --purge") err := cmd.Run() Expect(err).ToNot(HaveOccurred(), "Error uninstalling istio") @@ -64,8 +64,8 @@ var _ = Describe("platform-alteration-service-mesh-usage-installed", Ordered, fu []string{}, randomCertsuiteConfigDir) Expect(err).ToNot(HaveOccurred()) - if globalhelper.IsKindCluster() { - Skip("Service mesh test is not applicable for Kind cluster") + if globalhelper.IsVanillaK8sCluster() { + Skip("Service mesh test is not applicable for vanilla K8s clusters") } }) @@ -177,7 +177,7 @@ var _ = Describe("platform-alteration-service-mesh-usage-uninstalled", Serial, f if err == nil { By("Uninstall istio") if _, exists := os.LookupEnv("NON_LINUX_ENV"); !exists { - cmd := exec.Command("/bin/bash", "-c", "curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.24.1 sh - "+ + cmd := exec.Command("/bin/bash", "-c", "curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.28.0 sh - "+ "&& istio-1.24.1/bin/istioctl uninstall -y --purge") err := cmd.Run() Expect(err).ToNot(HaveOccurred(), "Error uninstalling istio") diff --git a/tests/platformalteration/tests/platform_alteration_sysctl_config.go b/tests/platformalteration/tests/platform_alteration_sysctl_config.go index a27231b21..e61eccacf 100644 --- a/tests/platformalteration/tests/platform_alteration_sysctl_config.go +++ b/tests/platformalteration/tests/platform_alteration_sysctl_config.go @@ -37,7 +37,7 @@ var _ = Describe("platform-alteration-sysctl-config", func() { Expect(err).ToNot(HaveOccurred()) By("If Kind cluster, skip") - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Kind cluster does not support MCO") } }) diff --git a/tests/platformalteration/tests/platform_alteration_tainted_node_kernel.go b/tests/platformalteration/tests/platform_alteration_tainted_node_kernel.go index 12296e8d3..abf949874 100644 --- a/tests/platformalteration/tests/platform_alteration_tainted_node_kernel.go +++ b/tests/platformalteration/tests/platform_alteration_tainted_node_kernel.go @@ -54,7 +54,7 @@ var _ = Describe("platform-alteration-tainted-node-kernel", Serial, func() { // 51390 It("Tainted node [negative]", func() { - if globalhelper.IsKindCluster() { + if globalhelper.IsVanillaK8sCluster() { Skip("Tainting a node not support on Kind cluster, skipping...") }