Add comprehensive e2e tests for TLS, GnuTLS, and GoTLS modules with CI integration#888
Conversation
- Created common.sh with reusable test utilities (certificate generation, process management, logging, cleanup handlers) - Added tls_e2e_test.sh to test OpenSSL/BoringSSL capture with Python HTTPS server and curl client - Added gnutls_e2e_test.sh to test GnuTLS capture with wget/curl client - Added gotls_e2e_test.sh to test Go TLS capture with custom Go server/client - Created go_https_server.go and go_https_client.go for GoTLS testing - Updated Makefile with e2e-tls, e2e-gnutls, e2e-gotls targets and unified 'make e2e' command - Added comprehensive e2e-tests.md documentation covering prerequisites, usage, troubleshooting, and CI/CD integration - Made test/e2e/run_e2e.sh executable All tests follow best practices: - Localhost-only (no external dependencies) - Root/sudo privilege checks - Kernel version validation (>=4.18 for x86_64) - Automatic certificate generation - Proper cleanup with trap handlers - Detailed logging and error reporting - Idempotent execution
Co-authored-by: cfc4n <709947+cfc4n@users.noreply.github.com>
Co-authored-by: cfc4n <709947+cfc4n@users.noreply.github.com>
|
@copilot 你的PR创建思路、实现方案基本符合我的预期,需要做一些微调。
|
|
🔧 Debug Build Complete (PR 888, RunID 19990759275) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. |
|
@copilot 你的PR创建思路、实现方案基本符合我的预期,需要做一些微调。
|
…er setup - Remove local HTTPS server creation, use https://github.com as test target - Delete go_https_server.go (no longer needed) - Remove certificate generation and server management functions from common.sh - Update all e2e test scripts to connect to https://github.com instead - Remove ecapture.pid references (ecapture doesn't create this file) - Move Testing section from README.md to COMPILATION.md - Update documentation to reflect simplified test approach - Go client validated with go vet and go fmt Co-authored-by: cfc4n <709947+cfc4n@users.noreply.github.com>
All requested changes have been completed in commit 4ad8e02:
|
|
🔧 Debug Build Complete (PR 888, RunID 19991147014) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. |
|
@copilot 为什么test/e2e/run_e2e.sh是空的? |
- Add guidance on running comprehensive e2e tests (make e2e) - Explain that comprehensive tests require root privileges - Keep existing smoke test functionality - Reference docs/e2e-tests.md for detailed information Co-authored-by: cfc4n <709947+cfc4n@users.noreply.github.com>
I've now updated it in commit 15c15cd to add guidance about running the comprehensive e2e tests (
|
|
🔧 Debug Build Complete (PR 888, RunID 19991458557) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. |
|
@copilot 在 dosc/e2e-tests.md 和 run_e2e.sh 中,你提到 “sudo make e2e “,但是,在makefile中,名字是test-e2e ,这是错误的。
|
- Remove 'test-e2e' target from Makefile - Keep only 'e2e' target for comprehensive tests - All documentation already references 'make e2e' consistently - Verified all test scripts have valid syntax - Verified Go client compiles successfully Co-authored-by: cfc4n <709947+cfc4n@users.noreply.github.com>
Fixed in commit 3b7676b:
|
|
🔧 Debug Build Complete (PR 888, RunID 19992165469) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. |
|
@copilot 根据生成的这个PR,再补充一个github action文件,在.github/workflows目录下,确保每次PR里的每次Commit可以运行这个e2e.yml ,即运行本次PR生成的e2e shell。 |
- Create .github/workflows/e2e.yml to run e2e tests on every PR commit - Workflow triggers on pull_request events (opened, synchronize, reopened) - Also runs on push to master/main branches - Sets up complete environment: Go 1.24.6, clang-14, curl, wget, openssl - Builds ecapture binary with make - Runs all e2e tests with sudo (make e2e) - Posts test results as PR comment with pass/fail status - Includes concurrency control to cancel outdated runs - Validates TLS/GnuTLS/GoTLS capture against github.com Co-authored-by: cfc4n <709947+cfc4n@users.noreply.github.com>
Created GitHub Actions workflow in commit 0b79eb5: File: Features:
The workflow validates that ecapture can capture HTTPS plaintext from github.com for all three TLS implementations. |
✅ E2E Test Results: PASSEDTest Run: #19992417743 Tests Executed:
✅ All e2e tests passed successfully! The TLS capture functionality is working correctly. Automated e2e test results for commit c85f9e2 |
|
🔧 Debug Build Complete (PR 888, RunID 19992417552) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. |
Refactored E2E Tests - Using External HTTPS Server
This update simplifies the e2e test infrastructure based on reviewer feedback.
Changes Made
Removed Local Server Setup
test/e2e/go_https_server.gocommon.shhttps://git.832008.xyzas the targetSimplified Test Scripts
tls_e2e_test.sh: Uses curl to connect to git.832008.xyzgnutls_e2e_test.sh: Uses wget/curl to connect to git.832008.xyzgotls_e2e_test.sh: Uses Go client to connect to git.832008.xyzDocumentation Updates
README.mdtoCOMPILATION.mddocs/e2e-tests.mdto reflect external server approachImproved run_e2e.sh
make e2ewith root privilegesUnified Makefile Targets
test-e2etarget to avoid confusione2etarget now runs all comprehensive testse2e,e2e-tls,e2e-gnutls,e2e-gotlsGitHub Actions CI Integration
.github/workflows/e2e.ymlworkflowCode Quality
go vetandgo fmtTest Flow (Simplified)
Each test now:
Usage
CI/CD Integration
The e2e tests now run automatically on:
Test results are automatically posted as PR comments showing:
Benefits
e2etarget, consistent namingFiles changed: 10 files (9 modified, 1 deleted, 1 added)
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.