diff --git a/.github/workflows/gatekeeper-k8s-integrationtests.yaml b/.github/workflows/gatekeeper-k8s-integrationtests.yaml index db71dad7..3613d9f0 100644 --- a/.github/workflows/gatekeeper-k8s-integrationtests.yaml +++ b/.github/workflows/gatekeeper-k8s-integrationtests.yaml @@ -15,7 +15,7 @@ jobs: raw: find policy/* -regex '.*test_data\/integration\/.*$' -exec kubeval --openshift --strict --skip-kinds ServiceMonitor {} \; - name: Create k8s Kind Cluster - uses: helm/kind-action@v1.2.0 + uses: helm/kind-action@v1.7.0 - name: Test against KinD run: | diff --git a/_test/gatekeeper-k8s-integrationtests.sh b/_test/gatekeeper-k8s-integrationtests.sh index 0385893c..7e786a7b 100755 --- a/_test/gatekeeper-k8s-integrationtests.sh +++ b/_test/gatekeeper-k8s-integrationtests.sh @@ -208,9 +208,12 @@ teardown() { print_info "${status}" "${output}" "${cmd}" "${tmp}" [ "$status" -eq 1 ] - [[ "${lines[0]}" == *"denied the request: [containerresourcesmemoryunitincorrect] RHCOP-OCP_BESTPRACT-00013: Deployment/invalidresourcesrequestsmemoryunits"* ]] - [[ "${lines[1]}" == *"denied the request: [containerresourcesmemoryunitincorrect] RHCOP-OCP_BESTPRACT-00013: Deployment/invalidresourceslimitsmemoryunits"* ]] - [[ "${#lines[@]}" -eq 2 ]] + + [[ "${lines[0]}" == *"spec.template.spec.containers[0].resources.requests[memory]: fractional byte value"* ]] + [[ "${lines[1]}" == *"spec.template.spec.containers[0].resources.limits[memory]: fractional byte value"* ]] + [[ "${lines[2]}" == *"denied the request: [containerresourcesmemoryunitincorrect] RHCOP-OCP_BESTPRACT-00013: Deployment/invalidresourcesrequestsmemoryunits"* ]] + [[ "${lines[3]}" == *"denied the request: [containerresourcesmemoryunitincorrect] RHCOP-OCP_BESTPRACT-00013: Deployment/invalidresourceslimitsmemoryunits"* ]] + [[ "${#lines[@]}" -eq 4 ]] } @test "policy/ocp/bestpractices/container-resources-requests-cpuunit-incorrect" {