diff --git a/.github/workflows/test-go-task.yml b/.github/workflows/test-go-task.yml index 4b4c2865a4c..e37c78f886c 100644 --- a/.github/workflows/test-go-task.yml +++ b/.github/workflows/test-go-task.yml @@ -70,8 +70,9 @@ jobs: - name: Collect tests id: collection + # jq flags must be "-cRn" see: https://stackoverflow.com/a/68859958/1655275 run: | - echo "tests-data=$(go list ./internal/integrationtest/... | grep integrationtest/ | tr "/" " " | cut -d " " -f 6 | jq -cR '[inputs]')" >> $GITHUB_OUTPUT + echo "tests-data=$(go list ./internal/integrationtest/... | grep integrationtest/ | tr "/" " " | cut -d " " -f 6 | jq -cRn '[inputs]')" >> $GITHUB_OUTPUT test-integration: needs: tests-collector diff --git a/internal/integrationtest/board/board_test.go b/internal/integrationtest/board/board_test.go index e4163c749c6..46581575ca7 100644 --- a/internal/integrationtest/board/board_test.go +++ b/internal/integrationtest/board/board_test.go @@ -630,6 +630,7 @@ func TestCLIStartupWithCorruptedInventory(t *testing.T) { require.NoError(t, err) _, err = f.WriteString(`data: '[{"name":"WCH;32?'","fqbn":"esp32:esp32:esp32s3camlcd"}]'`) require.NoError(t, err) + require.NoError(t, f.Close()) // the CLI should not be able to load inventory and report it to the logs _, stderr, err := cli.Run("core", "update-index", "-v") diff --git a/internal/integrationtest/board/hardware_loading_test.go b/internal/integrationtest/board/hardware_loading_test.go index 9b2a6d44e10..9b4a3345c0c 100644 --- a/internal/integrationtest/board/hardware_loading_test.go +++ b/internal/integrationtest/board/hardware_loading_test.go @@ -154,12 +154,7 @@ func TestHardwareLoading(t *testing.T) { out, _, err := cli.Run("core", "list", "--format", "json") require.NoError(t, err) jsonOut := requirejson.Parse(t, out) - if runtime.GOOS == "windows" { - // a package is a symlink, and windows does not support them - jsonOut.LengthMustEqualTo(2) - } else { - jsonOut.LengthMustEqualTo(3) - } + jsonOut.LengthMustEqualTo(3) jsonOut.MustContain(`[ { "id": "arduino:avr",