Skip to content

Create Docker Test Infrastructure #116

Closed

Description

@josecelano

Parent Issue: #113 - Create Dependency Installation Package for E2E Tests
Depends On: #115 - Create CLI Binary with Check Command (Issue 1-1-2)
Epic: #112 - Refactor and Improve E2E Test Execution

Overview

Create Docker-based testing infrastructure to verify the CLI binary works correctly in a clean Ubuntu environment. This ensures the binary can detect missing dependencies and provides confidence before implementing installation logic.

This is Phase 3 of 4 for building the dependency installation package.

Objectives

  • Create Dockerfile based on ubuntu:24.04
  • Set up container helpers for file operations
  • Write Docker-based tests for the CLI binary
  • Test detection of missing and installed tools
  • Verify exit codes and error messages

Key Components

Dockerfile:

  • Base: ubuntu:24.04
  • Installs: build-essential, curl
  • Does NOT install: cargo-machete, OpenTofu, Ansible, LXD (tests detection of missing deps)

Container Helpers:

  • Copy existing helpers from src/testing/e2e/containers/
  • copy_file_to_container() - Copy binary to container
  • Container startup and cleanup utilities

Tests:

  • Test binary detects missing dependencies correctly
  • Test binary reports installed dependencies correctly
  • Verify exit codes (0 for all present, 1 for missing deps)

Acceptance Criteria

  • Pre-commit checks pass
  • Dockerfile builds successfully
  • Docker tests run and pass
  • CLI binary correctly detects missing tools
  • Exit codes are correct in all scenarios
  • Tests are documented and maintainable

Time Estimate

2-3 hours

Related Documentation

Activity

  1. added 2 commits that reference this issue on Nov 3, 2025
  2. added 4 commits that reference this issue on Nov 4, 2025
  3. added 15 commits that reference this issue on Nov 4, 2025
  4. added 2 commits that reference this issue on Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions