Skip to content

test: quiet DO API HTTP logs + assert guest fs/egress in SSH test#11

Merged
richardcase merged 2 commits into
mainfrom
test/do-http-logging-and-guest-checks
Jul 17, 2026
Merged

test: quiet DO API HTTP logs + assert guest fs/egress in SSH test#11
richardcase merged 2 commits into
mainfrom
test/do-http-logging-and-guest-checks

Conversation

@richardcase

Copy link
Copy Markdown
Member

What

Two small, independent test-tooling improvements (split into two commits).

1. Quiet DO API HTTP logs behind a flag

pydo runs on the Azure SDK, whose HttpLoggingPolicy logs every DigitalOcean API request/response at INFO — very noisy. Silence the azure.* logger tree by default and gate verbose HTTP logging behind:

  • a new --log-http pytest flag, or
  • LOG_HTTP=true env var (documented in .env.example).

tests/conftest.py reuses config._bool for the env parse.

2. Stronger in-guest assertions in the SSH reachability test

Beyond SSH login + hostname match, the test now runs real in-guest commands over the session:

  • ls / — guest filesystem is live,
  • ping -c 3 1.1.1.1 — outbound network works through the host bridge's MASQUERADE NAT (raw IP, no DNS dependency).

Notes

  • Independent of ci: add manual-dispatch e2e acceptance workflow #10 (workflow PR); touches only test tooling + .env.example.
  • Offline pytest tests/test_cleanup.py still passes. The new HTTP-log toggle and guest assertions only exercise under the full e2e run (real infra).

pydo runs on the Azure SDK, whose HttpLoggingPolicy logs every DigitalOcean
API request/response at INFO. Silence the azure.* logger tree by default and
gate verbose HTTP logging behind a new --log-http pytest flag / LOG_HTTP env
var (documented in .env.example).
Beyond SSH login and hostname, run real in-guest commands over the session:
ls / (guest filesystem is live) and ping 1.1.1.1 (outbound network works
through the host bridge's MASQUERADE NAT).
Copilot AI review requested due to automatic review settings July 17, 2026 20:15
@richardcase
richardcase merged commit 9260d75 into main Jul 17, 2026
1 check passed
@richardcase
richardcase deleted the test/do-http-logging-and-guest-checks branch July 17, 2026 20:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes two targeted improvements to the acceptance test harness: it reduces noisy DigitalOcean HTTP logging from the Azure/pydo stack by default (with an opt-in toggle), and it strengthens the SSH reachability e2e test by running additional in-guest commands to validate filesystem and egress.

Changes:

  • Add --log-http pytest flag and LOG_HTTP env var to toggle verbose DigitalOcean API HTTP request/response logging.
  • Default the azure.* logger tree to WARNING to keep e2e output readable unless explicitly enabled.
  • Extend the microVM SSH reachability test to run ls / and an egress ping from inside the guest.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/test_ssh_reachability.py Adds additional in-guest command assertions (filesystem + egress) during SSH validation.
tests/conftest.py Introduces a pytest flag/env toggle to control Azure/pydo HTTP logging verbosity.
.env.example Documents the new LOG_HTTP environment variable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +82 to +84
rc, out, _ = guest.run("ls /", check=True, timeout=30)
assert rc == 0
log.info("microVM %s ls / -> %s", target_ip, out.split())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants