From 9656eacd284e10046fbe4508288949eb2ee9badd Mon Sep 17 00:00:00 2001 From: saileshwar-skyflow Date: Tue, 26 Nov 2024 15:10:09 +0530 Subject: [PATCH] SK-1749: Fix update test constants step --- .github/workflows/shared-tests.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/shared-tests.yml b/.github/workflows/shared-tests.yml index b5ab774..4099dfe 100644 --- a/.github/workflows/shared-tests.yml +++ b/.github/workflows/shared-tests.yml @@ -22,9 +22,14 @@ jobs: - name: Process and Update Test Constants run: | - echo "${{ secrets.VALID_SKYFLOW_CREDS_TEST }}" > ./tests/service_account/valid_credentials.json - STRING_FORMAT=$(echo "${{ secrets.VALID_SKYFLOW_CREDS_TEST }}" | jq -c .) - DICT_FORMAT=$(echo "${{ secrets.VALID_SKYFLOW_CREDS_TEST }}" | jq .) + CREDS="${{ secrets.VALID_SKYFLOW_CREDS_TEST }}" + CREDS=$(echo "$CREDS" | sed 's/\\n/\n/g') + + echo "$CREDS" > ./tests/service_account/valid_credentials.json + + STRING_FORMAT=$(echo "$CREDS" | jq -c .) + DICT_FORMAT=$(echo "$CREDS" | jq .) + sed -i "s|VALID_CREDENTIALS_STRING = .*|VALID_CREDENTIALS_STRING = '$STRING_FORMAT'|" ./tests/constants/test_constants.py sed -i "s|VALID_SERVICE_ACCOUNT_CREDS = .*|VALID_SERVICE_ACCOUNT_CREDS = $DICT_FORMAT|" ./tests/constants/test_constants.py shell: bash