-
Notifications
You must be signed in to change notification settings - Fork 0
Integrate dependency verification into E2E test binaries #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Co-authored-by: josecelano <58816+josecelano@users.noreply.github.com>
Co-authored-by: josecelano <58816+josecelano@users.noreply.github.com>
Co-authored-by: josecelano <58816+josecelano@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Integrate dependency installer with E2E tests
Integrate dependency verification into E2E test binaries
Nov 5, 2025
Copilot finished work on behalf of
josecelano
November 5, 2025 14:21
… package - Move verify_dependencies() and DependencyVerificationError from testing/e2e to packages/dependency-installer/src/verification.rs - Remove re-export layer in src/testing/e2e/dependencies.rs - Update all E2E test binaries to import directly from torrust-dependency-installer package - Export verification functionality from dependency-installer package - Improve code organization and reusability by placing verification with related functionality
- Extract verify_required_dependencies() in e2e_tests_full.rs - Extract verify_required_dependencies() in e2e_config_tests.rs - Extract verify_required_dependencies() in e2e_provision_and_destroy_tests.rs - Reduces main() function complexity - Improves code readability and maintainability
…verification module - Remove unit tests that depend on system state (installed dependencies) - These tests were unreliable across different CI/dev environments - Comprehensive Docker-based integration tests already exist in packages/dependency-installer/tests/ - Add note explaining why unit tests were removed in favor of integration tests
Add verify_required_dependencies() calls to all E2E test functions in: - tests/e2e_create_command.rs (4 tests) - tests/e2e_destroy_command.rs (4 tests) All tests use empty dependency arrays with documentation explaining: - Current state: no system dependencies required - Future extensibility: how to add dependencies when needed This ensures consistency with the pattern established in E2E test binaries and facilitates future dependency additions.
josecelano
approved these changes
Nov 5, 2025
Member
josecelano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 1964ea8
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.
E2E test binaries now fail-fast with clear error messages when system dependencies (OpenTofu, Ansible, LXD) are missing, rather than failing cryptically during test execution.
Changes
testing::e2e::dependencies: Providesverify_dependencies()function andDependencyVerificationErrorwith actionable installation instructionse2e-tests-full: OpenTofu, Ansible, LXDe2e-provision-and-destroy-tests: Ansiblee2e-config-tests: AnsibleUsage
When dependencies are missing:
Dependency checking adds ~1ms overhead per test binary startup.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
canonical-bos01.cdn.snapcraftcontent.com/usr/lib/snapd/snapd(dns block)get.opentofu.orgcurl --proto =https --tlsv1.2 -fsSL REDACTED -o /tmp/install-opentofu.sh(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.