-
Couldn't load subscription status.
- Fork 0
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
Copilot
Metadata
Metadata
Assignees
Labels
No labels