Add tests for checking connectivity, fix Supervisor update test#4008
Conversation
When there's a problem with connectivity, it may result in obscure errors later in the testing. Add checks testing three scenarions: * connectivity in host - both using curl and nmcli * connectivity in Supervisor container (uses docker0 as default via) * connectivity in CLI container (uses hassio as default via) Also make sure that Supervisor upgrade isn't attempted when the version information is missing.
📝 WalkthroughWalkthroughThe changes introduce three new connectivity test functions in the smoke test suite and enhance the supervisor version test. The new tests check host, supervisor, and Hass.io container connectivity using curl commands and nmcli. The supervisor test now retrieves the latest version information into a variable, asserts its presence, and conditionally skips the test if the supervisor is up to date. Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as Test Runner
participant Shell as Command Executor
Runner->>Shell: Execute `curl` for host connectivity
Shell-->>Runner: Return connectivity response
Runner->>Shell: Run `nmcli` for connectivity check
Shell-->>Runner: Return full connectivity status
sequenceDiagram
participant Runner as Test Runner
participant Supervisor as Supervisor Service
Runner->>Supervisor: Retrieve latest supervisor version (supervisor_version_latest)
Supervisor-->>Runner: Return version info
alt Missing version info
Runner->>Runner: Assert failure ("Latest supervisor version info missing")
else Version info present
Runner->>Runner: Compare supervisor_version with supervisor_version_latest
alt Versions are equal
Runner->>Runner: Log message and skip test
else
Runner->>Runner: Proceed with test validations
end
end
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Definitions (1)tests/smoke_test/test_basic.py (2)
🔇 Additional comments (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
When there's a problem with connectivity, it may result in obscure errors later in the testing. Add checks testing three scenarions:
Also make sure that Supervisor upgrade isn't attempted when the version information is missing.
Summary by CodeRabbit