From c47d978902b07385b0effb6f5649e2dc7220e927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Brauer?= Date: Wed, 18 May 2022 08:34:12 +0000 Subject: [PATCH] test: value to be masked should not be hard-coded in the action Co-authored-by: Markus Wolf --- pkg/runner/runner_test.go | 2 +- pkg/runner/testdata/mask-values/composite/action.yml | 4 ++-- pkg/runner/testdata/mask-values/push.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/runner/runner_test.go b/pkg/runner/runner_test.go index 224d1012b59..3d2a24f534b 100644 --- a/pkg/runner/runner_test.go +++ b/pkg/runner/runner_test.go @@ -230,7 +230,7 @@ func TestMaskValues(t *testing.T) { }) assertNoSecret(output, "secret value") - assertNoSecret(output, "composite secret") + assertNoSecret(output, "YWJjCg==") } func TestRunEventSecrets(t *testing.T) { diff --git a/pkg/runner/testdata/mask-values/composite/action.yml b/pkg/runner/testdata/mask-values/composite/action.yml index cbeb2298cf9..08a1b79d691 100644 --- a/pkg/runner/testdata/mask-values/composite/action.yml +++ b/pkg/runner/testdata/mask-values/composite/action.yml @@ -6,7 +6,7 @@ runs: steps: - run: echo "secret value" shell: bash - - run: echo "::add-mask::composite secret" + - run: echo "::add-mask::$(echo "abc" | base64)" shell: bash - - run: echo "composite secret" + - run: echo "abc" | base64 shell: bash diff --git a/pkg/runner/testdata/mask-values/push.yml b/pkg/runner/testdata/mask-values/push.yml index fb7e837ef43..befe73fbfb0 100644 --- a/pkg/runner/testdata/mask-values/push.yml +++ b/pkg/runner/testdata/mask-values/push.yml @@ -9,4 +9,4 @@ jobs: - run: echo "::add-mask::secret value" - run: echo "secret value" - uses: ./mask-values/composite - - run: echo "composite secret" + - run: echo "YWJjCg=="