From ec6b414b5f286a4c0d3d1d695b7e864c20cf274f Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 4 Oct 2022 14:35:17 +0200 Subject: [PATCH 1/2] Do not run go integration tests in parallel This is required since the integration tests shares the download folder. Still not ideal, it would be better if the cli could handle concurrent access to the download folder (from multiple cli processes...), but at least allows to run the tests without random failures. --- Taskfile.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index e62e419ab4a..ea46850fcd2 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -95,10 +95,12 @@ tasks: - task: go:build dir: '{{default "./" .GO_MODULE_PATH}}' cmds: + # "-p 1" will not run test in parallel, this is required for integration tests - | go test \ -v \ -short \ + -p 1 \ -run '{{default ".*" .GO_TEST_REGEX}}' \ {{default "-timeout 10m -coverpkg=./... -covermode=atomic" .GO_TEST_FLAGS}} \ -coverprofile=coverage_unit.txt \ From f585f06b9bffb48e7d5c5a4bbf7d76673d5d4cee Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 4 Oct 2022 14:38:07 +0200 Subject: [PATCH 2/2] Fixed integration test --- internal/integrationtest/upgrade/upgrade_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/integrationtest/upgrade/upgrade_test.go b/internal/integrationtest/upgrade/upgrade_test.go index 4c503d80fef..04e359d1ac3 100644 --- a/internal/integrationtest/upgrade/upgrade_test.go +++ b/internal/integrationtest/upgrade/upgrade_test.go @@ -28,9 +28,9 @@ func TestUpgrade(t *testing.T) { defer env.CleanUp() // Updates index for cores and libraries - _, _, err := cli.Run("core", "update-idex") + _, _, err := cli.Run("core", "update-index") require.NoError(t, err) - _, _, err = cli.Run("lib", "update-idex") + _, _, err = cli.Run("lib", "update-index") require.NoError(t, err) // Installs an outdated core and library