Skip to content

test: refactor automation strategy around real APISIX E2E and Ginkgo #19

@guoqqqi

Description

@guoqqqi

Background

Current a6 test strategy still mixes two models:

  • command-layer tests under pkg/cmd/** rely heavily on mocked APISIX Admin API responses
  • real end-to-end coverage exists under test/e2e/, but it is still built on Go's standard testing package rather than a scenario-oriented framework

We are now adopting two new rules for the repository:

  1. Command behavior tests must stop using mocked APISIX Admin API responses. If a command's behavior depends on the Admin API, it should be covered by E2E against a real APISIX instance.
  2. E2E should be standardized on Ginkgo/Gomega, following the scenario-oriented style used in large integration suites such as Kubernetes e2e.

Goal

Refactor the a6 automated test strategy so that:

  • unit tests are only used for pure logic that does not require mocking external environments
  • command behavior coverage is migrated toward real APISIX E2E
  • Ginkgo becomes the standard framework for E2E organization and execution
  • CI remains stable during the migration

Deliverables

  • updated testing policy and repository guidance
  • Ginkgo/Gomega E2E foundation in test/e2e
  • phased migration plan for command coverage from mocked Admin API tests to real E2E
  • eventual cleanup of legacy mocked command tests

Execution Plan

This umbrella is tracked by the following issues:

  • policy/docs update
  • Ginkgo E2E bootstrap
  • first migration batch for core resources
  • later migration and legacy cleanup

Notes

  • this issue is about strategy and phased migration, not a single implementation PR
  • #14 remains the original follow-up issue that identified testing gaps; this issue narrows the next-stage testing architecture work

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