test: quiet DO API HTTP logs + assert guest fs/egress in SSH test#11
Merged
Conversation
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).
There was a problem hiding this comment.
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-httppytest flag andLOG_HTTPenv 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 egresspingfrom 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()) |
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.
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
HttpLoggingPolicylogs every DigitalOcean API request/response at INFO — very noisy. Silence theazure.*logger tree by default and gate verbose HTTP logging behind:--log-httppytest flag, orLOG_HTTP=trueenv var (documented in.env.example).tests/conftest.pyreusesconfig._boolfor 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
.env.example.pytest tests/test_cleanup.pystill passes. The new HTTP-log toggle and guest assertions only exercise under the full e2e run (real infra).