Skip to content

Test EAC commands for extension development workflow #98

@miohansen

Description

@miohansen

Overview

Thoroughly test all eac commands in the context of developing a new extension (using ext-env-check as the test case) to validate the extension development workflow. This ensures the extension development experience is smooth and all commands work correctly.

Context

Extension developers use eac commands directly to build, test, and validate their extensions. eac now runs independently from clie — commands are invoked as eac <command> without going through a container wrapper.

Test Extension: ext-env-check (located at C:\source\ready-to-release\ext-env-check)

Command prefix: eac (runs directly, not via ext-eac container)

Commands to Test

1. Module Discovery and Information

eac get-modules

Purpose: List all modules in the repository

Test Cases:

# Basic listing
eac get-modules

# JSON output
eac get-modules --format json

# Specific module filter
eac get-modules --moniker ext-env-check

Expected Output:

  • Shows ext-env-check module
  • Displays module type: container
  • Shows versioning scheme: SemVer
  • Lists file patterns

Validation:

  • Command runs successfully
  • Output includes ext-env-check module
  • Module type correctly identified as "container"
  • File paths are correct relative to repository root
  • JSON output is valid and parseable

eac show-modules

Purpose: Display module details in human-readable format

Test Cases:

eac show-modules
eac show-modules ext-env-check

Validation:

  • Command runs successfully
  • Table formatting is correct
  • All ext-env-check details displayed

eac get-files

Purpose: List all tracked files with module ownership

Test Cases:

eac get-files
eac get-files --module ext-env-check
eac get-files --module ext-env-check --format json

Validation:

  • Command completes within reasonable time
  • ext-env-check files correctly identified
  • File ownership is accurate

eac get-files-by-module

Purpose: Get files grouped by module

Test Cases:

eac get-files-by-module ext-env-check
eac get-files-by-module ext-env-check --format json

Validation:

  • Command runs successfully
  • All ext-env-check files listed
  • File categorization is correct

2. Dependency Management

eac get-dependencies

Test Cases:

eac get-dependencies ext-env-check
eac get-dependencies ext-env-check --reverse
eac get-dependencies ext-env-check --format json

Validation:

  • Command runs successfully
  • Correctly identifies ext-env-check has no dependencies
  • Reverse dependencies work (should be empty)

eac show-dependencies

Test Cases:

eac show-dependencies ext-env-check

Validation:

  • Command runs successfully
  • Works for modules with no dependencies

eac validate-dependencies

Test Cases:

eac validate-dependencies ext-env-check
eac validate-dependencies

Validation:

  • Command runs successfully
  • Validates go.mod correctly
  • Error messages are clear

3. Build Commands

eac build

Purpose: Build module (container or binary)

Test Cases:

eac build ext-env-check
eac build ext-env-check --debug
eac build ext-env-check --platform linux/amd64
eac build ext-env-check --no-cache

Expected Output:

  • Docker build starts
  • Multi-stage build completes successfully
  • Container image created with correct tags
  • Build artifacts in out/build/ext-env-check/

Validation:

  • Command runs successfully
  • Container builds without errors
  • Multi-platform builds work (linux/amd64, linux/arm64)
  • Build cache works correctly
  • Output artifacts are created
  • Build logs are visible
  • Error messages are clear

eac get-build-times

eac get-build-times ext-env-check

Validation:

  • Command runs successfully
  • Timing data is accurate

eac show-build-summary

eac show-build-summary ext-env-check

Validation:

  • Command runs successfully
  • Summary is comprehensive

4. Test Commands

eac test

Test Cases:

eac test ext-env-check
eac test ext-env-check --suite unit
eac test ext-env-check --list-only
eac test ext-env-check --debug
eac test ext-env-check --race

Validation:

  • Command runs successfully
  • Go unit tests execute
  • Godog BDD tests execute
  • Test discovery finds all tests
  • Test filtering works (by suite, by tag)
  • Race detection works
  • Test manifest is generated
  • Coverage reports work
  • Test output is visible in real-time

eac get-test-results

eac get-test-results ext-env-check
eac get-test-results ext-env-check --suite unit
eac get-test-results ext-env-check --format json

Validation:

  • Command runs successfully
  • Results are accurate
  • Failed tests are clearly reported

eac show-test-summary

eac show-test-summary ext-env-check

Validation:

  • Command runs successfully
  • Summary is comprehensive

eac test-debug

eac test-debug ext-env-check

Validation:

  • Failure information is helpful
  • Stack traces are readable

5. Lint and Validation Commands

eac lint

Test Cases:

eac lint ext-env-check
eac lint ext-env-check --fix
eac lint ext-env-check --linter golangci-lint

Validation:

  • Command runs successfully
  • golangci-lint runs with .golangci.yml config
  • Issues are reported clearly
  • Auto-fix works

eac validate-module-files

eac validate-module-files ext-env-check

Validation:

  • File ownership is validated
  • Errors are clear

eac validate-contracts

eac validate-contracts
eac validate-contracts --contract repository

Validation:

  • Schemas are validated
  • Error messages are helpful

6. Specification Commands

eac create-spec

eac create-spec ext-env-check "validate prefix matching for environment variables"
eac create-spec ext-env-check "strict mode validation" --output specs/ext-env-check/env-validation/strict-mode.feature

Validation:

  • Command runs successfully
  • Generated specs are valid Gherkin
  • Files are written to correct location
  • AI provider configuration works

eac validate-specs

eac validate-specs ext-env-check
eac validate-specs ext-env-check --file specs/ext-env-check/env-validation/basic-check.feature

Validation:

  • Gherkin syntax validation works
  • Quality rules are checked
  • Error messages are clear

eac get-specs

eac get-specs ext-env-check
eac get-specs ext-env-check --format json

Validation:

  • All specs are listed
  • Metadata is accurate

7. Release Commands

eac release-pending

eac release-pending ext-env-check

Validation:

  • Correctly identifies pending changes

eac release-this

eac release-this ext-env-check
eac release-this ext-env-check --dry-run
eac release-this ext-env-check --version 0.2.0

Validation:

  • Changelog is generated correctly
  • Conventional commits are parsed
  • Version calculation is correct
  • File writes work correctly

eac get-changelog / eac show-changelog

eac get-changelog ext-env-check
eac get-changelog ext-env-check --version 0.1.0
eac show-changelog ext-env-check

Validation:

  • Changelog parsing works
  • Version filtering works
  • Output is well-formatted

8. Artifact Commands

eac get-artifacts / eac show-artifacts

eac get-artifacts ext-env-check
eac show-artifacts ext-env-check

Validation:

  • Container artifacts are listed
  • Image tags are correct
  • Output is informative

9. Git and Change Tracking Commands

eac show-files-changed

eac show-files-changed
eac show-files-changed --module ext-env-check

Validation:

  • Git status detection works
  • Module ownership is accurate
  • File paths are correct

eac show-files-staged

eac show-files-staged

Validation:

  • Git staging area is accessible

eac get-changed-modules

eac get-changed-modules
eac get-changed-modules --since HEAD~5

Validation:

  • Module detection is accurate
  • Git history traversal works

10. Documentation Commands

eac update-docs

eac update-docs ext-env-check
eac update-docs

Validation:

  • Diagram rendering works
  • Files are written correctly

Docker Build Testing

Since eac runs natively now, Docker is only involved when eac build invokes the Docker daemon directly (not as a container wrapper). Test the Docker build path specifically:

Validation:

  • Docker socket is accessible when running eac build
  • Multi-stage builds complete correctly (linux/amd64, linux/arm64)
  • Docker BuildKit is available
  • Platform emulation (QEMU) works for cross-platform builds
  • Build context size and performance are acceptable
# Verify build produces correct image
eac build ext-env-check
docker images | grep ext-env-check

# Test the built image directly
docker run --rm ghcr.io/ready-to-release/ext-env-check:ci --version
docker run --rm ghcr.io/ready-to-release/ext-env-check:ci extension-meta

Testing Strategy

1. Setup

cd C:\source\ready-to-release\ext-env-check
# eac is available directly — no install step required
eac show-modules  # smoke test

2. Automated Test Script

Create scripts/test-eac-commands.sh:

#!/bin/bash
set -e

MODULE="ext-env-check"
echo "Testing EAC Commands for $MODULE"

echo "Testing get-modules..."
eac get-modules --moniker $MODULE

echo "Testing build..."
eac build $MODULE

echo "Testing test..."
eac test $MODULE

echo "Testing lint..."
eac lint $MODULE

echo "Testing validate-specs..."
eac validate-specs $MODULE

echo "Testing release-pending..."
eac release-pending $MODULE

echo "All tests passed!"

3. Full Integration Workflow

# Discovery
eac get-modules
eac get-files --module ext-env-check

# Development
eac lint ext-env-check
eac validate-specs ext-env-check

# Build
eac build ext-env-check

# Test
eac test ext-env-check

# Release
eac release-pending ext-env-check
eac release-this ext-env-check --dry-run

Validation:

  • Entire workflow completes without errors
  • All artifacts are created
  • Commands can be chained together

4. Error Scenario Testing

# Invalid module name
eac build nonexistent-module

# Git errors
eac release-this ext-env-check  # with uncommitted changes

# Docker errors
eac build ext-env-check  # with Docker daemon stopped

Validation:

  • Error messages are clear and actionable
  • Exit codes are correct
  • Logs are helpful for debugging

Success Criteria

Command Execution:

  • All commands run successfully via eac
  • No command hangs or times out unexpectedly
  • Error messages are clear and actionable

Extension Development Workflow:

  • Can discover and inspect ext-env-check module
  • Can build ext-env-check container image
  • Can run tests including godog specs
  • Can generate and validate specifications
  • Can lint and validate code
  • Can prepare releases with changelog generation

Documentation:

  • All test results documented
  • Known issues and workarounds documented
  • Performance benchmarks recorded

Deliverables

  1. Test Report (out/eac-commands-test-report.md): command-by-command results, issues discovered, performance metrics
  2. Command Reference (docs/reference/eac-commands.md): usage notes, troubleshooting guide, limitations
  3. Automated Test Suite (scripts/test-eac-commands.sh): runnable test script with exit codes for CI
  4. Issue Tracking: GitHub issues for bugs found, enhancement requests, documentation gaps

Related Issues

Priority

High — Critical for extension development experience

  • Validates eac works correctly for extension repositories
  • Required for ext-env-check completion
  • Foundation for extension documentation
  • Identifies issues before external users encounter them

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions