From a820b53d6557b7cc8efa6d2875d4bc839b0c9f8f Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Thu, 15 Aug 2024 12:16:57 +0100 Subject: [PATCH] refactor: Update config.env with test billing private key --- .github/workflows/test.common.yaml | 1 + Common/test-setup.sh | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/test.common.yaml b/.github/workflows/test.common.yaml index feae4897b8..e2bb186a14 100644 --- a/.github/workflows/test.common.yaml +++ b/.github/workflows/test.common.yaml @@ -12,6 +12,7 @@ jobs: runs-on: ubuntu-latest env: CI_PIPELINE_ID: ${{github.run_number}} + TEST_BILLING_PRIVATE_KEY: ${{secrets.TEST_BILLING_PRIVATE_KEY}} steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 diff --git a/Common/test-setup.sh b/Common/test-setup.sh index 2d20191f82..835943180e 100644 --- a/Common/test-setup.sh +++ b/Common/test-setup.sh @@ -32,6 +32,15 @@ sed -i 's/.*REDIS_PORT.*/REDIS_PORT=6310/' config.env sed -i 's/.*REDIS_DB.*/REDIS_DB=0/' config.env sed -i 's/.*REDIS_USERNAME.*/REDIS_USERNAME=default/' config.env +# sed all of these values +sed -i 's/.*SUBSCRIPTION_PLAN_BASIC.*/SUBSCRIPTION_PLAN_BASIC=Free,price_1M4niQANuQdJ93r7AVjhnik5,price_1M4niQANuQdJ93r7l1Wz1dkm,0,0,1,0/' config.env +sed -i 's/.*SUBSCRIPTION_PLAN_GROWTH.*/SUBSCRIPTION_PLAN_GROWTH=Growth,price_1M4nhZANuQdJ93r7yfQ1MePQ,price_1M4r3OANuQdJ93r7g8NyoCBq,22,20,2,14/' config.env +sed -i 's/.*SUBSCRIPTION_PLAN_SCALE.*/SUBSCRIPTION_PLAN_SCALE=Scale,price_1MKidGANuQdJ93r7FoaZ1dOb,price_1MKidRANuQdJ93r7LVOc0BUy,99,84,3,14/' config.env +sed -i 's/.*SUBSCRIPTION_PLAN_ENTERPRISE.*/SUBSCRIPTION_PLAN_ENTERPRISE=Enterprise,price_1M4ng9ANuQdJ93r7CP90ezSN,price_1M4ng9ANuQdJ93r72ZYUp4PU,-1,-1,4,14/' config.env + +sed -i 's/.*BILLING_PUBLIC_KEY.*/BILLING_PUBLIC_KEY=pk_test_51LleTZANuQdJ93r7PvyfOvpm5TZXtUf1T5fjS5cbOmDuCFIiGMoEhvuIrzTRMcZirg7qJwgbjLeCmXmxL1BiUDi100IzcuP3SU/' config.env +sed -i 's/.*BILLING_PUBLIC_KEY.*/BILLING_PUBLIC_KEY=$TEST_BILLING_PRIVATE_KEY/' config.env + # print config.env file echo "config.env file" cat config.env