Files
upstream-mirror 64898b2c79
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
2026-09-15 15:05:30 +05:00

45 lines
2.1 KiB
Python

from zerver.lib.test_classes import WebhookTestCase
class GocdHookTests(WebhookTestCase):
def test_building_pipeline(self) -> None:
expected_topic = "Pipeline / Stage"
expected_message = """**Pipeline building**: Pipeline / Stage
- **Commit**: [`59f3c6e4540`](https://github.com/swayam0322/Test/commit/59f3c6e4540) on branch `main`
- **Started**: <time:Feb 1, 2024, 1:58:13 AM>"""
self.check_webhook(
"pipeline_building",
expected_topic,
expected_message,
)
def test_completed_pipeline_success(self) -> None:
expected_topic = "Pipeline / Stage"
expected_message = """:green_circle: **Build passed**: Pipeline / Stage
- **Commit**: [`59f3c6e4540`](https://github.com/swayam0322/Test/commit/59f3c6e4540) on branch `main`
- **Started**: <time:Feb 1, 2024, 1:58:13 AM>
- **Finished**: <time:Feb 1, 2024, 1:58:40 AM>
- **Passed**: `Job`"""
self.check_webhook("pipeline_passed", expected_topic, expected_message)
def test_completed_pipeline_fail(self) -> None:
expected_topic = "pipeline-one / stage-two"
expected_message = """:red_circle: **Build failed**: pipeline-one / stage-two
- **Commit**: [`963eb239c7b`](https://github.com/PieterCK/getting-started-repo.git/commit/963eb239c7b) on branch `master`
- **Started**: <time:Aug 28, 2024, 9:30:19 PM>
- **Finished**: <time:Aug 28, 2024, 9:31:00 PM>
- **Failed**: `task-two`"""
self.check_webhook("pipeline_failed", expected_topic, expected_message)
def test_completed_pipeline_with_mixed_result(self) -> None:
expected_topic = "test-pipeline / backend-tests"
expected_message = """:red_circle: **Build failed**: test-pipeline / backend-tests
- **Commit**: [`963eb239c7b`](https://github.com/PieterCK/getting-started-repo.git/commit/963eb239c7b) on branch `master`
- **Started**: <time:Aug 29, 2024, 3:59:18 PM>
- **Finished**: <time:Aug 29, 2024, 4:00:15 PM>
- **Failed**: `check-backend-lints`, `test-frontend-js`
- **Passed**: `check-backend-tests`, `zulip-ci-debian-12`"""
self.check_webhook("pipeline_with_mixed_job_result", expected_topic, expected_message)