Skip to content

Create Detection Logic Package #114

Closed

Description

@josecelano

Parent Issue: #113 - Create Dependency Installation Package for E2E Tests
Depends On: None (first phase)
Epic: #112 - Refactor and Improve E2E Test Execution

Overview

Create the package structure and implement detection logic to check if development dependencies (cargo-machete, OpenTofu, Ansible, LXD) are installed.

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

Objectives

  • Create packages/dependency-installer/ structure following packages/linting/ pattern
  • Define ToolDetector trait for detection abstraction
  • Implement 4 detector structs (CargoMachete, OpenTofu, Ansible, LXD)
  • Create DependencyManager to coordinate detectors
  • Add comprehensive unit tests with mocked commands
  • Set up tracing for observability

Key Components

ToolDetector Trait:

trait ToolDetector {
    fn name(&self) -> &str;
    fn is_installed(&self) -> Result<bool, DetectionError>;
}

4 Detector Implementations:

  • CargoMacheteDetector - checks cargo machete --version
  • OpenTofuDetector - checks tofu --version
  • AnsibleDetector - checks ansible --version
  • LxdDetector - checks lxc --version

DependencyManager:

  • Coordinates all detectors
  • Provides check_all() method returning status for all tools

Acceptance Criteria

  • Pre-commit checks pass
  • Package structure follows linting package pattern
  • ToolDetector trait is well-defined
  • All 4 detectors are implemented with proper error handling
  • DependencyManager works correctly
  • Unit tests cover all detectors with mocked commands
  • Logging provides clear visibility

Time Estimate

2-3 hours

Related Documentation

Activity

  1. added 4 commits that reference this issue on Nov 3, 2025
  2. added 2 commits that reference this issue on Nov 4, 2025
  3. added 2 commits that reference this issue on Nov 4, 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