Repository navigation
Closed
Description
Parent Epic: #34 - Implement Create Environment Command
Depends On: #36 - Application Layer Command
Estimated Time: 1-2 hours
Overview
Update the src/bin/e2e_tests_full.rs to use the new create command handler instead of direct environment creation. This ensures the full E2E test exercises the complete create command functionality as part of the comprehensive test suite.
Goals
- Add new function to create environment using CreateCommand handler
- Update e2e_tests_full.rs to use the new create command for environment creation
- Maintain existing test flow while exercising create command logic
- Ensure comprehensive test coverage of create command in full E2E context
- Preserve existing test reliability and performance
Implementation Summary
- Location:
src/bin/e2e_tests_full.rs - Approach: Add
create_environment_via_command()function that uses CreateCommand handler - Integration: Replace direct environment creation with command-based creation
- Testing: Not black-box like Subissue 4 - this uses the command handler directly
Key Changes
// Add function to create environment using CreateCommand
async fn create_environment_via_command(context: &TestContext) -> Result<Environment<Created>> {
let create_command = CreateCommand::new(context.environment_repository.clone());
let config = EnvironmentCreationConfig {
environment_name: context.environment_name.clone(),
ssh_credentials: context.ssh_credentials.clone(),
};
create_command.execute(config)
}
// Replace direct environment creation in main test function
let environment = create_environment_via_command(&context)
.await
.expect("Failed to create environment via command");Acceptance Criteria
- E2E full tests use CreateCommand handler for environment creation
- All existing E2E test functionality remains intact
- Create command is properly exercised in comprehensive test suite
- Test execution time and reliability maintained
- Proper error handling and logging preserved
For detailed specification, see: docs/issues/epic-create-environment-command-subissue-5-update-e2e-full-tests.md
Reacted by Copilot
Metadata
Metadata
Assignees
Labels
No labels
Activity
docs: [#34] create GitHub issues for Create Environment Command EPIC
refactor: [#39] move cleanup_previous_test_data to preflight_cleanup …
refactor: [#39] move cleanup_previous_test_data to preflight_cleanup …
refactor: [#39] move cleanup_previous_test_data to preflight_cleanup …
Merge #47: Update E2E full tests to use CreateCommandHandler and fix …
chore: remove closed issue documentation files
Merge #111: Extract verbosity filtering logic into dedicated Verbosit…
Merge #126: Add Theme/Configuration Support for UserOutput
Merge #134: Add FormatterOverride trait for alternative output format…
Merge #137: Add type-safe channel routing for UserOutput with newtype…
Merge #143: Add OutputSink abstraction for multi-destination output
Merge #145: Migrate CI workflows from bash scripts to Rust dependency…
Merge #153: Install Git pre-commit hooks to enforce checks in Copilot…
Merge #406: feat: [#405] deploy Hetzner demo tracker and document pro…