-
Notifications
You must be signed in to change notification settings - Fork 2
test: support apisix standalone (part 2) #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: ashing <[email protected]>
conformance test reportapiVersion: 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. |
…_standalone_port2
Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing <[email protected]>
There was a problem hiding this 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
Frameworkand migrate to package-level vars inapi7framework. - Extend
Deployerinterface withCreateAdditionalGatewayandCleanupAdditionalGatewayand 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) todashboardHTTPTunnel/dashboardHTTPSTunneland 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
Frameworkstruct or otherwise scoping them per test instance.
func (f *Framework) BeforeSuite() {
test/e2e/scaffold/scaffold.go:76
- The
GatewayResourcesstruct is missing anAdminAPIKey stringfield, but the deployer implementations setresources.AdminAPIKey. AddAdminAPIKey stringto the struct so it compiles and captures the key.
type GatewayResources struct {
|
|
||
| // TODO: move to deployer | ||
| additionalGatewayGroups map[string]*GatewayGroupResources | ||
| apisixCli dashboard.Dashboard |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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