Skip to content

feat(test): add integration test layer (no credentials required) #74

Description

@fredaluliu

Background

Current E2E tests all require real Tencent Cloud credentials and live sandbox instances, making PR feedback slow and blocking external contributors who don't have credentials.

Proposal

Add a new tests/integ/ layer that validates CLI behavior without any cloud credentials:

  • Compile the real agr binary
  • Run commands in a subprocess with credentials cleared
  • Assert on: JSON Envelope structure, help text, exit codes, error classification, schema output

This mirrors the pattern already used in cmd/agr/characterization_test.go but as a dedicated CI job.

Scope

  • agr --help / agr <cmd> --help output validation
  • agr schema <cmd> -o json structure validation
  • agr explain <code> output validation
  • agr version -o json structure validation
  • agr doctor (no-credential mode) output validation
  • Error exit codes for invalid inputs (exit 2)
  • JSON Envelope schema compliance (agr.v1)

Expected Outcome

  • New tests/integ/ directory with test files
  • New CI job that runs in <30s without credentials
  • External contributors can validate their changes pass CI without needing cloud access

Category

Testing / DX

Metadata

Metadata

Assignees

No one assigned

    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