From 10562634bfa31f5b1eeb8710cac97df9206d3059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Mon, 10 Jun 2024 10:42:34 +0200 Subject: [PATCH] Upgrade Helm to a version that doesn't have failing tests Unfortunately this requires disabling tests on go < 1.22 because the new version requires it. this is only temporary so I think we can live with that. Also limit the max processes started by go to two as otherwise with "-n auto" parallel runs the machine can go OOM before the tests continue as each test run is running jobs for all cores. --- tests/test_go.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test_go.py b/tests/test_go.py index bdf51ba1..e7b4efb8 100644 --- a/tests/test_go.py +++ b/tests/test_go.py @@ -44,7 +44,7 @@ def test_go_version(auto_container): GitRepositoryBuild( repository_url="https://github.com/weaveworks/kured.git", repository_tag="1.13.2", - build_command="go run ./cmd/kured -h && go test -race ./...", + build_command="env GOMAXPROCS=2 go run ./cmd/kured -h && go test -race ./...", ).to_pytest_param(), ], indirect=["container_git_clone"], @@ -68,8 +68,8 @@ def test_build_kured(auto_container_per_test, container_git_clone): [ GitRepositoryBuild( repository_url="https://github.com/helm/helm.git", - repository_tag="v3.14.3", - build_command="make build test-unit", + repository_tag="v3.15.1", + build_command="env GOMAXPROCS=2 make build test-unit", ).to_pytest_param(), ], indirect=["container_git_clone"], @@ -79,6 +79,11 @@ def test_build_helm(auto_container_per_test, container_git_clone): container with :command:`make` pre-installed. """ + + go_version = auto_container_per_test.connection.check_output("go version") + if "go1.20" in go_version or "go1.21" in go_version: + pytest.skip("Helm requires Go >= 1.22") + auto_container_per_test.connection.check_output( container_git_clone.test_command )