This directory contains Docker configurations for testing the dependency-installer CLI.
Base Ubuntu 24.04 image for testing the CLI binary in a clean environment.
Purpose: Verify that the dependency-installer check command correctly detects missing tools.
Usage in tests:
let image = GenericImage::new("ubuntu", "24.04")
.with_wait_for(WaitFor::message_on_stdout("Ready"));- Build the binary:
cargo build --bin dependency-installer - Copy binary into container using testcontainers
- Run
checkcommand in container - Verify it correctly reports missing tools
- (Phase 4) Install tools and verify installation
cd packages/dependency-installer
docker build -f docker/ubuntu-24.04.Dockerfile -t dependency-installer-test:ubuntu-24.04 .# Run all Docker-based integration tests
cd packages/dependency-installer
cargo test --test docker_check_command
# Run a specific test
cargo test --test docker_check_command test_check_all_reports_missing_dependenciesThe tests use testcontainers to:
- Automatically start and stop Docker containers
- Copy the compiled binary into containers
- Execute commands and capture output
- Verify exit codes and output messages
This ensures tests run in isolated, reproducible environments.
tests/docker_check_command.rs- Integration tests using this infrastructuretests/containers/- Container helper utilities