From 24afd9edb581c985b39ad0aaf80f6b775f5967dd Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Sat, 6 Jan 2024 02:31:01 +0000 Subject: [PATCH 1/2] Update kustomize test for new kyverno version --- tests/test_kustomize.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_kustomize.py b/tests/test_kustomize.py index 19fdfd2d..1827fdf1 100644 --- a/tests/test_kustomize.py +++ b/tests/test_kustomize.py @@ -81,8 +81,7 @@ async def test_validate_fail(path: Path) -> None: """Test applying policies to validate resources.""" cmd = kustomize.grep("kind=ConfigMap", path) with pytest.raises( - exceptions.CommandException, match="require-test-annotation: validation error" - ): + exceptions.CommandException, match="fail: 1"): await cmd.validate(TESTDATA_DIR / "policies/fail.yaml") From 53073f995083e9a0e2429ba0478e272d2e5571e8 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Sat, 6 Jan 2024 02:43:00 +0000 Subject: [PATCH 2/2] Test with newer kyverno cli to match devcontainer --- .github/workflows/python-package.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index 29972ea6..04365ee3 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -35,9 +35,9 @@ jobs: pip install -e . - uses: supplypike/setup-bin@v3 with: - uri: https://github.com/kyverno/kyverno/releases/download/v1.9.0/kyverno-cli_v1.9.0_linux_x86_64.tar.gz + uri: https://github.com/kyverno/kyverno/releases/download/v1.11.3/kyverno-cli_v1.11.3_linux_x86_64.tar.gz name: kyverno-cli - version: v1.9.0 + version: v1.11.3 - name: Test with pytest run: | SKIP_DIFF_TESTS=1 pytest --cov=flux_local --cov-report=term-missing --snapshot-warn-unused