test: Add Helm chart E2E testing via K3s + testcontainers#2099
Draft
everettbu wants to merge 3 commits into
Draft
test: Add Helm chart E2E testing via K3s + testcontainers#2099everettbu wants to merge 3 commits into
everettbu wants to merge 3 commits into
Conversation
Adds infrastructure to deploy n8n via its Helm chart into a real K3s cluster (inside Docker) and run Playwright E2E tests against it. Uses NodePort routing (not kubectl port-forward) for reliable traffic delivery under sustained test load. Supports standalone (SQLite) and queue (PostgreSQL + Redis + workers) deployment modes. New files: - helm-stack.ts: Core module (K3s lifecycle, image preloading, Helm install) - helm-start-stack.ts: CLI wrapper with --mode, --image, --chart-ref flags - test-e2e-helm.yml: Manual dispatch workflow with mode/chart-ref dropdowns - HELM-TESTING.md: Prerequisites, architecture, troubleshooting Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror of n8n-io/n8n#26155
Original author: shortstacked
Summary
/k3s) and runs Playwright E2E tests against itkubectl port-forwardfor reliable traffic delivery under sustained test loadNew Files
packages/testing/containers/helm-stack.tspackages/testing/containers/helm-start-stack.tspnpm stack:helm) with--mode,--image,--chart-refflags.github/workflows/test-e2e-helm.ymlpackages/testing/containers/HELM-TESTING.mdWhy NodePort over port-forward
kubectl port-forwardsilently stops routing traffic after ~6 concurrent connections. The process stays alive, no error is emitted, but HTTP requests return nothing — causing cascade test timeouts. NodePort uses kube-proxy for stateless per-connection routing, which is reliable under sustained load.What this enables
This infrastructure validates Kubernetes-specific deployment concerns that can't be tested with testcontainers alone:
Future: Playwright fixture integration
The
createHelmStackAPI is designed to plug into the existing Playwright fixture system (same pattern as chaos tests). A test file could usetest.use({ capability: { helmMode: 'queue', helmOverrides: { ... } } })to spin up a Helm stack with custom overrides per test suite — enabling infrastructure-level E2E tests alongside existing feature tests.Test plan
standalonemode — verify 35/35 building-blocks tests passqueuemode — verify deployment succeeds (queue mode has tighter resource constraints)pnpm stack:helm --image n8nio/n8n:lateststarts stack, Ctrl+C cleans up🤖 Generated with Claude Code