Skip to content

Commit

Permalink
Update E2E workflow to include failed webhook URL
Browse files Browse the repository at this point in the history
  • Loading branch information
simlarsen committed Apr 26, 2024
1 parent a0ef85b commit 35c21d7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion E2E/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"preinstall": "npx playwright install-deps && npx playwright install",
"test": "playwright test",
"test": "playwright test || (curl $E2E_TESTS_FAILED_WEBHOOK_URL && exit 1)",
"dep-check": "npm install -g depcheck && depcheck ./ --skip-missing=true",
"clear-modules": "rm -rf node_modules && rm package-lock.json && npm install",
"compile": "tsc"
Expand Down
2 changes: 2 additions & 0 deletions HelmChart/Public/oneuptime/templates/e2e-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ spec:
value: {{ $.Values.cronJobs.e2e.registeredUserPassword | quote }}
- name: E2E_TEST_STATUS_PAGE_URL
value: {{ $.Values.cronJobs.e2e.statusPageUrl | quote }}
- name: E2E_TESTS_FAILED_WEBHOOK_URL
value: {{ $.Values.cronJobs.e2e.failedWebhookUrl | quote }}
restartPolicy: Never

{{- end }}
3 changes: 2 additions & 1 deletion HelmChart/Public/oneuptime/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,6 @@ cronJobs:
registeredUserEmail:
registeredUserPassword:
# This is the URL of the status page you want to test. This is used to check if the status page is up and running.
statusPageUrl:
statusPageUrl:
failedWebhookUrl:

3 changes: 3 additions & 0 deletions config.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,7 @@ E2E_TEST_USER_PASSWORD=
# If you want to run the E2E tests on a status page, then you need to fill in the URL.
E2E_TEST_STATUS_PAGE_URL=

# This URL will be called when the E2E tests fail. This should be a GET endpoint.
E2E_TESTS_FAILED_WEBHOOK_URL=


1 change: 1 addition & 0 deletions docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ services:
E2E_TEST_REGISERED_USER_EMAIL: ${E2E_TEST_REGISERED_USER_EMAIL}
E2E_TEST_REGISERED_USER_PASSWORD: ${E2E_TEST_REGISERED_USER_PASSWORD}
E2E_TEST_STATUS_PAGE_URL: ${E2E_TEST_STATUS_PAGE_URL}
E2E_TESTS_FAILED_WEBHOOK_URL: ${E2E_TESTS_FAILED_WEBHOOK_URL}
logging:
driver: "local"
options:
Expand Down

0 comments on commit 35c21d7

Please sign in to comment.