• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Geoffery10 / Discord-Role-Manager / 27891208327
90%

Build:
DEFAULT BRANCH: main
Ran 21 Jun 2026 02:41AM UTC
Jobs 1
Files 26
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Jun 2026 02:39AM UTC coverage: 80.936% (+11.8%) from 69.118%
27891208327

push

github

Geoffery10
Add test_dashboard_helpers.py — dashboard/main.py helpers at 30% coverage

13 tests covering the pure helpers and schema migration in
dashboard/main.py. The route handlers (Phase 11) and OIDC discovery
remain uncovered — they need full ASGI scaffolding.

  db_conn()
    - returns a sqlite3.Connection with busy_timeout=5000 set

  read_json() / write_json()
    - read returns {} when file is missing (not None, not raise)
    - read parses existing JSON
    - write creates files with indent=4 (matches existing config style)
    - write overwrites existing files

  _get_git_commit()
    - returns the short SHA from git rev-parse
    - returns 'unknown' sentinel when git fails (so the dashboard
      still renders rather than crashing the page)

  _get_server_ip()
    - filters loopback and IPv6 from getaddrinfo results
    - falls back to the UDP probe (10.254.254.254:1 trick) when
      only loopback comes back
    - returns 'unknown' when both strategies fail

  _ensure_schema()
    - no-op when users table doesn't exist (fresh checkout)
    - adds avatar column to legacy users table
    - rebuilds guilds with id as PRIMARY KEY and dedupes via
      MIN(name) — same migration logic as iDiscord._ensure_schema

Dashboard main went from 0% to 30%. The remaining 70% is the 29
FastAPI route handlers (auth, users, roles, guilds, birthdays,
logs) plus OIDC discovery — covered by Phase 11.

Importing dashboard.main has heavy side effects (FastAPI app build,
subprocess git call, socket probe). The dashboard_main fixture
patches socket.getaddrinfo and socket.socket at module scope and
restores them on teardown so other tests aren't affected.

120 of 120 new or added lines in 1 file covered. (100.0%)

2161 of 2670 relevant lines covered (80.94%)

0.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27891208327.1 21 Jun 2026 02:40AM UTC 26
80.94
GitHub Action Run
Source Files on build 27891208327
  • Tree
  • List 26
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27891208327
  • bba83dba on github
  • Prev Build on main (#27890672416)
  • Next Build on main (#27891283875)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc