Skip to content

[Subissue 5/7] Update E2E Full Tests to Use Create Command #39

Closed

Description

@josecelano

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

Activity

  1. added a commit that references this issue on Oct 25, 2025
  2. added 4 commits that reference this issue on Oct 26, 2025
  3. added 7 commits that reference this issue on Nov 3, 2025
  4. added a commit that references this issue on Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions