test(e2e): add KinD workflow to run integration tests#670
test(e2e): add KinD workflow to run integration tests#670nicknikolakakis wants to merge 2 commits into
Conversation
PR knative-extensions#568 introduced an integration-tagged Go test that drives the GitLabSource receive adapter via simulated webhook POSTs, but it had no CI hook. This adds the missing pieces to run it on every push and pull request: - Seed third_party/eventing-latest/eventing-{crds,core}.yaml from the knative-nightly bucket so the update-nightlies job set up in knative-extensions/knobots#402 can start producing daily PRs. - Add .github/workflows/kind-e2e.yaml that creates a KinD cluster, installs Knative Serving + Kourier and the seeded Eventing core, builds and deploys eventing-gitlab via ko, applies the existing samples/ fixtures, and runs go test -tags=integration ./test/... The sample GitLabSource points at gitlab.example.com so the controller cannot register a real webhook. Rather than waiting on the source to become Ready, the workflow waits on the receive adapter Knative Service URL, which is what the test actually depends on. Fixes knative-extensions#496 Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
|
Welcome @nicknikolakakis! It looks like this is your first PR to knative-extensions/eventing-gitlab 🎉 |
|
/assign @creydr |
|
/ok-to-test |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #670 +/- ##
=======================================
Coverage 37.93% 37.93%
=======================================
Files 20 20
Lines 580 580
=======================================
Hits 220 220
Misses 347 347
Partials 13 13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The integration test runs `go test` on the GitHub runner, but the GitLabSource receive adapter ksvc resolves to *.svc.cluster.local, which the runner's host resolver cannot reach. Every webhook POST failed with `lookup ...svc.cluster.local: server misbehaving`. Forward the cluster-local Kourier listener (svc/kourier-internal:80 in kourier-system) to localhost in the workflow, and have the test honor WEBHOOK_URL / WEBHOOK_HOST env overrides. The override path preserves the original ksvc host as the Host header so Knative still routes the request to the correct service. Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: nicknikolakakis The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Proposed Changes
third_party/eventing-latest/eventing-{crds,core}.yamlfrom theknative-nightlybucket so the update-nightlies job set up in knobots#402 can start producing daily PRs against this repo..github/workflows/kind-e2e.yamlthat creates a KinD cluster, installs Knative Serving + Kourier and the seeded Eventing core, builds and deploys eventing-gitlab viako, applies the existingsamples/fixtures, and runsgo test -tags=integration ./test/....The integration test added in #568 drives the
GitLabSourcereceive adapter via simulated webhook POSTs but had no CI hook. This wires it up.Notes for reviewers
GitLabSourcepoints atgitlab.example.com, so the controller cannot register a real webhook and the source will not becomeReady. The workflow waits on the receive adapter Knative Service URL instead, which is the only condition the test actually depends on. This is documented inline in the workflow YAML.v0.31.0, K8sv1.34.3(digest-pinned), Knativeknative-v1.22.0. Eventing manifests come from the seededthird_party/eventing-latest/soupdate-nightliescan roll them forward daily.Fixes #496
Release Note