Skip to content

test(channels): add Telethon-based E2E test suite for Telegram channel (#2122)#2131

Merged
bug-ops merged 1 commit intomainfrom
feat/issue-2122/telethon-e2e-telegram-test
Mar 22, 2026
Merged

test(channels): add Telethon-based E2E test suite for Telegram channel (#2122)#2131
bug-ops merged 1 commit intomainfrom
feat/issue-2122/telethon-e2e-telegram-test

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Mar 22, 2026

Summary

  • Adds scripts/telegram-e2e/telegram_e2e.py: async Telethon test runner with 8 scenarios — /start welcome, math (347×89=30883), /reset, /skills MarkdownV2 escaping, empty document (no reply), long output (≥2 split messages), streaming first-chunk latency (<30s), unauthorized-user silence
  • Adds scripts/telegram-e2e/setup_tg_test_account.py: one-time interactive setup that registers a Test DC user account and saves the Telethon session file; Test DC phone format +99966XXXXX, no real SIM required
  • Adds config/telegram-test.toml: bot config template for Test DC (vault token, allowed_users placeholder)
  • Adds .github/workflows/telegram-e2e.yml: CI job running on push to main, gated by ZEPH_TELEGRAM_TEST_TOKEN / TELEGRAM_TEST_SESSION / TELEGRAM_TEST_API_ID / TELEGRAM_TEST_API_HASH / TELEGRAM_TEST_BOT_USERNAME secrets; skips automatically when any secret is absent
  • .gitignore: adds *.session to exclude Telethon session files from the repository

Test plan

  • cargo +nightly fmt --check — pass
  • cargo clippy --workspace --features full -- -D warnings — pass
  • cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 6388 passed
  • Configure repository secrets and verify CI job runs on merge to main
  • Local manual run: python3 scripts/telegram-e2e/telegram_e2e.py --help — usage shown

@bug-ops bug-ops enabled auto-merge (squash) March 22, 2026 14:45
@github-actions github-actions bot added documentation Improvements or additions to documentation config Configuration file changes ci CI/CD configuration tests Test-related changes size/XL Extra large PR (500+ lines) labels Mar 22, 2026
#2122)

Adds a Telethon/Python E2E test suite that connects to Telegram Test DC as a
user account, starts Zeph with a Test DC bot token, and runs 8 scenarios:
/start welcome, math (347×89=30883), /reset, /skills (MarkdownV2 escaping),
empty document (no reply), long output (>=2 split messages), streaming
(first chunk latency <30s), and unauthorized-user silence.

- scripts/telegram-e2e/telegram_e2e.py — async scenario runner (Telethon)
- scripts/telegram-e2e/setup_tg_test_account.py — one-time Test DC session setup
- scripts/telegram-e2e/requirements.txt — telethon>=1.36
- config/telegram-test.toml — bot config template for Test DC
- .github/workflows/telegram-e2e.yml — CI job gated by repository secrets,
  runs on push to main only; skips automatically when secrets are absent
- .gitignore: add *.session to exclude Telethon session files
@bug-ops bug-ops force-pushed the feat/issue-2122/telethon-e2e-telegram-test branch from 6ebbbd6 to c6118f1 Compare March 22, 2026 14:50
@github-actions github-actions bot added tests Test-related changes and removed tests Test-related changes labels Mar 22, 2026
@bug-ops bug-ops merged commit 72b140b into main Mar 22, 2026
25 checks passed
@bug-ops bug-ops deleted the feat/issue-2122/telethon-e2e-telegram-test branch March 22, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD configuration config Configuration file changes documentation Improvements or additions to documentation size/XL Extra large PR (500+ lines) tests Test-related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(channels): add Telethon-based E2E test suite for Telegram channel using Telegram Test DC

1 participant