Repository navigation
Conversation
Tests ask func describe for the deployed function's route and reach it with an HTTP client that falls back to an in-cluster dialer pod when the host does not resolve. The suite then runs with any default deployer, such as raw downstream. Each deployer reports its own route: the Knative Service URL, or for raw the cluster-local Service URL, which the dialer makes reachable from the test runner with no Route or ingress. The HTTP and CloudEvents checks both use that client. The expose tests keep their own client, since they assert external reach. Describe only locates the function; its response still decides whether a test passes. TestCore_Describe asserts that the route is set and that the function answers there, as the other tests rely on it. TestCore_Delete lists with every deployer's lister, as func list does. FUNC_E2E_DOMAIN is removed, since no test builds a function URL from it.
Both Subscriptions tests call func subscribe through newCmd, as every other func call in the suite does, so the step honors FUNC_E2E_PLUGIN (for kn func) and verbose mode.
TestExpose_RemoteKedaRoute fails when it finds no KEDA HTTP interceptor Service, as the other keda Route tests fail without KEDA. A missing or renamed interceptor on OpenShift then shows as a failure, not a skip.
There was a problem hiding this comment.
🟡 Changes recommended
The fallback dialer ignores the selected test namespace, which can prevent cluster-local probes from running under namespace-scoped permissions.
1 open issue
What changed in this PR
Makes the end-to-end suite deployer-independent by discovering function routes through func describe and using an HTTP client with an in-cluster fallback.
Changes:
- Replace constructed Knative URLs with described routes across deployment tests.
- Validate described routes and check deletion through all deployers’ listers.
- Standardize subscription commands, fail when the KEDA interceptor is missing, and remove obsolete domain configuration.
| File | Description |
|---|---|
| e2e/README.md | Remove obsolete domain configuration documentation. |
| e2e/e2e_test.go | Add route discovery and per-test fallback HTTP clients. |
| e2e/e2e_remote_test.go | Use described routes for remote deployments. |
| e2e/e2e_recorder_test.go | Reach recorder routes through the fallback client. |
| e2e/e2e_podman_test.go | Use described routes for Podman deployments. |
| e2e/e2e_metadata_test.go | Update route checks and standardize subscription commands. |
| e2e/e2e_matrix_test.go | Discover routes across deployment matrix tests. |
| e2e/e2e_matrix_python_test.go | Use described routes throughout Python deployment tests. |
| e2e/e2e_lifecycle_test.go | Use route discovery and fallback HTTP requests. |
| e2e/e2e_instanced_test.go | Update instance-state checks to use the shared client. |
| e2e/e2e_expose_test.go | Fail rather than skip when the interceptor is missing. |
| e2e/e2e_core_test.go | Validate described routes and list across deployers. |
| e2e/e2e_config_ci_test.go | Discover routes for workflow-deployed functions. |
Review effort: Balanced
The e2e HTTP client starts its fallback dialer pod in FUNC_E2E_NAMESPACE, where the tests deploy functions, whatever namespace the kubeconfig points at. A run that may create pods only in the test namespace then still reaches cluster-local functions.
| // defer func() { | ||
| // clean(t, name, Namespace) | ||
| // }() | ||
| // if !waitForContent(t, fmt.Sprintf("http://func-e2e-test-deploy-source.%s.%s", Namespace, Domain), "func-e2e-test-deploy-source") { |
There was a problem hiding this comment.
AI complains about this line that it has deleted var Domain in it. Ok to keep it or remove it.
There was a problem hiding this comment.
Thanks, Im digging into this more, the case that this sketch covers is one func does not allow currently and others similar are alrready covered. Will address in a followup either updarting or removing
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok, gauron99 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |

Changes
func describeinstead of building a Knative Service URL, and reach it with an HTTP client that falls back to an in-cluster dialer pod when the host does not resolve. The suite then runs with any default deployer, such as raw.TestCore_Describechecks that the described route is set and that the function answers there, since the other tests rely on it.TestCore_Deletelists with every deployer's lister, asfunc listdoes.func subscribethroughnewCmd, so they honorFUNC_E2E_PLUGINand verbose mode.TestExpose_RemoteKedaRoutefails, instead of skipping, when it finds no KEDA HTTP interceptor Service, as the other keda Route tests do.FUNC_E2E_DOMAIN, which no test uses any more./kind cleanup