Skip to content

Conversation

@ronething
Copy link
Contributor

@ronething ronething commented Jun 4, 2025

Remove dashboard tunnel related fields from the framework struct.

Add the following methods to the Deployer interface:

  • CreateAdditionalGateway(namePrefix string) (string, string, error)
  • CleanupAdditionalGateway(identifier string) error

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

conformance test report

apiVersion: gateway.networking.k8s.io/v1
date: "2025-06-04T18:07:15Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
  contact: null
  organization: APISIX
  project: apisix-ingress-controller
  url: https://github.com/apache/apisix-ingress-controller.git
  version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
    result: partial
    skippedTests:
    - HTTPRouteHTTPSListener
    statistics:
      Failed: 0
      Passed: 32
      Skipped: 1
  name: GATEWAY-HTTP
  summary: Core tests partially succeeded with 1 test skips.

@ronething ronething changed the title (WIP)test: support apisix standalone (part 2) test: support apisix standalone (part 2) Jun 4, 2025
@ronething ronething requested a review from Copilot June 5, 2025 01:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the test scaffold to remove dashboard tunnel fields from the Framework, adds support for standalone APISIX gateways via new CreateAdditionalGateway and CleanupAdditionalGateway methods on the Deployer interface, and updates all scaffold code and tests to use the new gateway APIs instead of the old gateway‐group functions.

  • Remove dashboard tunnel fields from Framework and migrate to package-level vars in api7 framework.
  • Extend Deployer interface with CreateAdditionalGateway and CleanupAdditionalGateway and implement them in both APISIX and API7 deployers.
  • Update scaffold code and E2E tests to replace legacy “gateway group” functions with the new “gateway” methods.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/e2e/scaffold/scaffold.go Replace additionalGatewayGroups with additionalGateways map and rename methods
test/e2e/scaffold/deployer.go Add CreateAdditionalGateway and CleanupAdditionalGateway to Deployer interface
test/e2e/scaffold/apisix_deployer.go Initialize additionalGateways in APISIXDeployer and implement the new methods
test/e2e/scaffold/api7_deployer.go Migrate API7Deployer to use additionalGateways and new gateway methods
test/e2e/ingress/ingress.go Update calls to Deployer.CreateAdditionalGateway and NewAPISIXClientForGateway
test/e2e/gatewayapi/httproute.go Swap out legacy gateway‐group calls for the new gateway API
test/e2e/crds/consumer.go Update CRD tests to use the new CreateAdditionalGateway API
test/e2e/apisix/basic.go Add a basic HTTP request test for the additional gateway
test/e2e/framework/framework.go Remove dashboard tunnel fields from Framework
test/e2e/framework/api7_framework.go Introduce package‐level tunnel vars and update framework methods
test/e2e/framework/api7_dashboard.go Change framework dashboard endpoint methods to use globals
test/e2e/framework/api7_consts.go Delete unused legacy certificates and keys
Comments suppressed due to low confidence (4)

test/e2e/framework/api7_framework.go:164

  • [nitpick] Leading underscores in Go identifiers are unconventional; rename _dashboardHTTPTunnel (and _dashboardHTTPSTunnel) to dashboardHTTPTunnel/dashboardHTTPSTunnel and consider making them struct fields instead of package-level globals.
_dashboardHTTPTunnel  *k8s.Tunnel

test/e2e/ingress/ingress.go:835

  • [nitpick] The test message still refers to "additional gateway group" even though the new method is CreateAdditionalGateway. Update it to "creating additional gateway" for consistency.
Expect(err).NotTo(HaveOccurred(), "creating additional gateway group")

test/e2e/framework/api7_framework.go:168

  • [nitpick] Using global tunnel variables can lead to races if tests ever run in parallel. Consider storing tunnels on the Framework struct or otherwise scoping them per test instance.
func (f *Framework) BeforeSuite() {

test/e2e/scaffold/scaffold.go:76

  • The GatewayResources struct is missing an AdminAPIKey string field, but the deployer implementations set resources.AdminAPIKey. Add AdminAPIKey string to the struct so it compiles and captures the key.
type GatewayResources struct {


// TODO: move to deployer
additionalGatewayGroups map[string]*GatewayGroupResources
apisixCli dashboard.Dashboard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep the dashboard?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be discussed because some test cases used this.

@ronething ronething merged commit 340f91f into release-v2-dev Jun 5, 2025
11 checks passed
@ronething ronething deleted the test/apisix_standalone_port2 branch June 5, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants