test(aiograpi): live e2e for /info + CI live-test job#48
Merged
Conversation
Add `tests/live/aiograpi_info_e2e.py`: spawns the real `insto` entrypoint (`@instagram -c info --json -`) for a pooled TEST_ACCOUNTS_URL account, performs a full aiograpi login (incl. TOTP, exercising the #45 fix), and asserts the JSON profile (username==instagram, pk==25025320). Reuses each account's client_settings as a seeded session and only honours an explicit IG_PROXY (pooled account proxies are unreliable — 302 on CONNECT). Add offline unit coverage in `tests/test_aiograpi_info_e2e.py` for the pure helpers (skip-clean path, totp extraction, env wiring, session seeding). Wire a `live-test` job into ci.yml (push/workflow_dispatch, canonical repo only) gated on the TEST_ACCOUNTS_URL secret; the script self-skips when the secret is absent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The accounts host (hikerapi.com) presents a valid certificate, so the verify=False copied from the saved-feed audit is unnecessary. Drop it to address the security review's TLS-verification finding; live e2e still passes with default verification. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the first true end-to-end live test for the
aiograpibackend: from thereal CLI entrypoint all the way to a rendered
/infoprofile. Closes the gapleft by the existing SDK-level audits, and wires it into CI behind a repo
secret.
Follows up #45 — the e2e exercises the TOTP login fix against live accounts.
What's new
tests/live/aiograpi_info_e2e.py— spawnsinsto @instagram -c info --json -for a pooled
TEST_ACCOUNTS_URLaccount (full aiograpi login incl. TOTP) andasserts the JSON envelope (
data.profile.username == "instagram",pk == "25025320"). Reuses each account'sclient_settingsas a seededsession and only honours an explicit
IG_PROXY(pooled account proxies areunreliable —
AuthRequiredProxyError: 302on CONNECT). Skips clean (exit 0)when the secret is unset.
tests/test_aiograpi_info_e2e.py— offline unit coverage for the purehelpers (skip-clean path, TOTP extraction from top-level/
client_settings,subprocess-env wiring, session seeding, secret redaction). No network.
.github/workflows/ci.yml— newlive-testjob +workflow_dispatchtrigger. Runs on push/dispatch to
subzeroid/instoonly (forks/PRs never getthe secret), gated on
secrets.TEST_ACCOUNTS_URL.Verification
ruff/ruff format/mypy instoclean;pytest --cov→ 925passed, 82.37% coverage.
account[1] info: ok (username=instagram pk=25025320)→PASS, exit 0.TEST_ACCOUNTS_URLsecret configured on the repo; thelive-testjob runson merge to
main.Note:
CLAUDE.mdis gitignored in this repo, so its "Live-smoke procedure"update stays local.
🤖 Generated with Claude Code