From bb28cdf0c663c52930873b4b67186033527049ec Mon Sep 17 00:00:00 2001 From: volodymyrZotov Date: Wed, 10 Aug 2022 11:44:12 +0300 Subject: [PATCH] added test case for load secrets via op cli --- .github/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 756f7b1..fe6ce9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,3 +61,21 @@ jobs: unset-previous: true - name: Assert removed secrets run: ./tests/assert-env-unset.sh + test-op-cli-load-secrets: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Load secrets + id: load_secrets + uses: ./ # 1password/load-secrets-action@ + env: + OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + SECRET: op://acceptance-tests/test-secret/password + SECRET_IN_SECTION: op://acceptance-tests/test-secret/test-section/password + MULTILINE_SECRET: op://acceptance-tests/multiline-secret/notesPlain + - name: Assert test secret values + env: + SECRET: ${{ steps.load_secrets.outputs.SECRET }} + SECRET_IN_SECTION: ${{ steps.load_secrets.outputs.SECRET_IN_SECTION }} + MULTILINE_SECRET: ${{ steps.load_secrets.outputs.MULTILINE_SECRET }} + run: ./tests/assert-env-set.sh