Add end-to-end testing for application accessibility and authentication#795
Add end-to-end testing for application accessibility and authentication#795
Conversation
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
lentzi90
left a comment
There was a problem hiding this comment.
I would prefer to define the scripts outside the chainsaw test and then just call them.
Please also avoid installing tools in the test itself. The test should assume any needed tools are available. These need to be installed before starting the test, e.g. in a previous step in the github workflow.
Note that the test fails to find the argo CLI when trying to download.
Please update with these fixes @copilot
- Extract test logic into separate shell scripts in .github/scripts/ - test-http-endpoints.sh: HTTP health checks - test-certificates.sh: TLS certificate validation - test-argocd-auth.sh: ArgoCD CLI authentication - Update chainsaw-test.yaml to call external scripts instead of inline content - Add ArgoCD CLI installation step in GitHub workflow - Remove tool installation from test scripts (now assumed available) Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
I've refactored the E2E tests as requested: ✅ Scripts extracted: Test logic moved to separate shell scripts in
✅ Tools installed in workflow: Added ArgoCD CLI installation step in ✅ Tests assume tools available: Scripts no longer install tools - they expect ✅ Modular design: Scripts can be called from chainsaw or run independently |
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
|
Please check how the release artifacts look like here: https://github.com/argoproj/argo-cd/releases. The workflow fails to find the checksum file! It is named cli_checksums.txt. @copilot |
…-checksums.txt Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Fixed! Updated both the workflow and README to use the correct checksum filename Commit: d124578 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
This needs a rebase @copilot . The ingress controller has been removed and we are using only gateway API now. That should no longer be relevant after a rebase. |
…o copilot/test-applications-end-to-end
…teway Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
... Merged main and updated all E2E tests for Gateway API:
|
|
@copilot the test failed with the below error. Please check and fix! |
The envoy-gateway proxy gets its external IP from MetalLB, not from 127.0.0.1. The test now dynamically discovers the gateway IP from the Gateway resource status and uses it for /etc/hosts entries. Also fixed curl error handling: use `|| true` instead of `|| echo "000"` to avoid concatenating the error marker with curl's write-out output (which caused the "000000" response seen in CI). Updated the certificate test to connect directly to the gateway IP with SNI instead of relying on hostname resolution. Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
... The root cause was that the test was hardcoding Two fixes applied:
Also updated the certificate test to connect directly to the gateway IP with SNI. Commit: eb22156 |
|
Still no luck. |
The MetalLB-assigned IP (10.89.0.200) is on the KinD Docker network and not reachable from the GitHub Actions host. Switch to kubectl port-forward which tunnels traffic to the gateway proxy service via the Kubernetes API. - HTTP test: port-forward to gateway proxy, use curl --resolve for hostname routing - Certificate test: port-forward to gateway proxy, use openssl SNI via localhost - Replace hardcoded sleep with retry loop checking port readiness - No /etc/hosts modification needed (uses curl --resolve instead) Co-authored-by: lentzi90 <9117693+lentzi90@users.noreply.github.com>
... The MetalLB IP (10.89.0.200) is on the KinD Docker network, which is not routable from the GitHub Actions runner host. Switched to
Commit: c376305 |
End-to-End Testing Implementation
This PR adds E2E tests that verify applications deployed via ArgoCD are functionally accessible, not just healthy at the Kubernetes resource level.
Changes
Test Scripts (
.github/scripts/)test-http-endpoints.sh: HTTP health checks viakubectl port-forwardto envoy-gateway proxy, usingcurl --resolvefor hostname routingtest-certificates.sh: TLS certificate validation via port-forward with OpenSSL SNItest-argocd-auth.sh: ArgoCD CLI authentication and API testing via--port-forwardChainsaw Test (
chainsaw-test.yaml)GitHub Workflow (
.github/workflows/pipeline.yaml)cli_checksums.txt)Documentation (
README.md)Connectivity Approach
The envoy-gateway proxy service gets a MetalLB-assigned IP (e.g.
10.89.0.200) on the KinD Docker network, which is not routable from the GitHub Actions runner host. Tests usekubectl port-forwardto tunnel traffic to the gateway proxy service:gateway.envoyproxy.io/owning-gateway-name=envoy-private)curl --resolvefor hostname routing without modifying/etc/hostsopenssl s_clientwith SNI via localhosttrap EXITTest Coverage
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.