.github: new stage user on each playwright run
This commit is contained in:
parent
7a839d0d3c
commit
7bceac6a36
1 changed files with 16 additions and 1 deletions
17
.github/workflows/playwright.yml
vendored
17
.github/workflows/playwright.yml
vendored
|
|
@ -54,7 +54,22 @@ jobs:
|
|||
- name: Run front-end Playwright tests
|
||||
env:
|
||||
BASE_URL: https://stage.foo.redhat.com:1337
|
||||
run: CURRENTS_PROJECT_ID=hIU6nO CURRENTS_RECORD_KEY=$CURRENTS_RECORD_KEY npx playwright test
|
||||
run: |
|
||||
export PLAYWRIGHT_USER=image-builder-playwright-$RANDOM
|
||||
export PLAYWRIGHT_PASSWORD=image-builder-playwright-$(uuidgen)
|
||||
# Step 1: Create a new empty account
|
||||
curl -k -X POST https://account-manager-stage.app.eng.rdu2.redhat.com/account/new -d "{\"username\": \"$PLAYWRIGHT_USER\", \"password\":\"$PLAYWRIGHT_PASSWORD\"}"
|
||||
# Step 2: Attach subscriptions to the new account
|
||||
curl -k -X POST https://account-manager-stage.app.eng.rdu2.redhat.com/account/attach \
|
||||
-d "{\"username\": \"$PLAYWRIGHT_USER\", \"password\":\"$PLAYWRIGHT_PASSWORD\", \"sku\":[\"RH00003\"],\"quantity\": 1}"
|
||||
# Step 3: Activate the new account by accepting Terms and Conditions
|
||||
curl -k -X POST https://account-manager-stage.app.eng.rdu2.redhat.com/account/activate -d "{\"username\": \"$PLAYWRIGHT_USER\", \"password\":\"$PLAYWRIGHT_PASSWORD\"}"
|
||||
# Step 4: Refresh account to update subscription pools
|
||||
curl -k -X POST https://account-manager-stage.app.eng.rdu2.redhat.com/account/refresh -d "{\"username\": \"$PLAYWRIGHT_USER\", \"password\":\"$PLAYWRIGHT_PASSWORD\"}"
|
||||
# Step 5: View account to check account status
|
||||
curl -k -X GET "https://account-manager-stage.app.eng.rdu2.redhat.com/account/get?username=$PLAYWRIGHT_USER&password=$PLAYWRIGHT_PASSWORD"
|
||||
|
||||
CURRENTS_PROJECT_ID=hIU6nO CURRENTS_RECORD_KEY=$CURRENTS_RECORD_KEY npx playwright test
|
||||
|
||||
- name: Store front-end Test report
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue