diff --git a/pkg/artifacts/server_test.go b/pkg/artifacts/server_test.go index 943820c..aeeb059 100644 --- a/pkg/artifacts/server_test.go +++ b/pkg/artifacts/server_test.go @@ -14,10 +14,11 @@ import ( "testing/fstest" "github.com/julienschmidt/httprouter" - "github.com/nektos/act/pkg/model" - "github.com/nektos/act/pkg/runner" log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" + + "github.com/nektos/act/pkg/model" + "github.com/nektos/act/pkg/runner" ) type writableMapFile struct { @@ -238,9 +239,11 @@ type TestJobFileInfo struct { containerArchitecture string } -var artifactsPath = path.Join(os.TempDir(), "test-artifacts") -var artifactsAddr = "127.0.0.1" -var artifactsPort = "12345" +var ( + artifactsPath = path.Join(os.TempDir(), "test-artifacts") + artifactsAddr = "127.0.0.1" + artifactsPort = "12345" +) func TestArtifactFlow(t *testing.T) { if testing.Short() { @@ -253,7 +256,7 @@ func TestArtifactFlow(t *testing.T) { defer cancel() platforms := map[string]string{ - "ubuntu-latest": "node:16-buster-slim", + "ubuntu-latest": "node:16-buster", // Don't use node:16-buster-slim because it doesn't have curl command, which is used in the tests } tables := []TestJobFileInfo{ diff --git a/pkg/artifacts/testdata/GHSL-2023-004/artifacts.yml b/pkg/artifacts/testdata/GHSL-2023-004/artifacts.yml index e717f14..ec801c3 100644 --- a/pkg/artifacts/testdata/GHSL-2023-004/artifacts.yml +++ b/pkg/artifacts/testdata/GHSL-2023-004/artifacts.yml @@ -8,9 +8,7 @@ jobs: steps: - run: echo "hello world" > test.txt - name: curl upload - uses: wei/curl@v1 - with: - args: -s --fail ${ACTIONS_RUNTIME_URL}upload/1?itemPath=../../my-artifact/secret.txt --upload-file test.txt + run: curl --silent --show-error --fail ${ACTIONS_RUNTIME_URL}upload/1?itemPath=../../my-artifact/secret.txt --upload-file test.txt - uses: actions/download-artifact@v2 with: name: my-artifact @@ -27,9 +25,7 @@ jobs: exit 1 fi - name: Verify download should work by clean extra dots - uses: wei/curl@v1 - with: - args: --path-as-is -s -o out.txt --fail ${ACTIONS_RUNTIME_URL}artifact/1/../../../1/my-artifact/secret.txt + run: curl --silent --show-error --fail --path-as-is -o out.txt ${ACTIONS_RUNTIME_URL}artifact/1/../../../1/my-artifact/secret.txt - name: 'Verify download content' run: | file="out.txt"