From 6fae0297f9a2f12fbbae023db17420577d1560a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 May 2023 15:57:05 +0000 Subject: [PATCH 1/2] Bump helm/kind-action from 1.2.0 to 1.7.0 Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.2.0 to 1.7.0. - [Release notes](https://github.com/helm/kind-action/releases) - [Commits](https://github.com/helm/kind-action/compare/v1.2.0...v1.7.0) --- updated-dependencies: - dependency-name: helm/kind-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/gatekeeper-k8s-integrationtests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: | From 07d33a3c9bebac1f3749564f4efb9948a9c12717 Mon Sep 17 00:00:00 2001 From: Gareth Healy Date: Wed, 17 May 2023 19:07:16 +0100 Subject: [PATCH 2/2] tweaked test checking --- _test/gatekeeper-k8s-integrationtests.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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" {