test: add integration tests for HTTP server, webhook, and executor #194
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/ttheart!194
Loading…
Reference in a new issue
No description provided.
Delete branch "test/add-integration-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add integration tests in
test/integration_test.gocovering the full pipeline:httptest.Server(#117)Why
Verify that components work together correctly across the webhook → rules → executor pipeline.
Testing
go test ./test/ -vand pre-commit passBreaking Changes
None.
Notes
/testat top level)t.TempDir()for clean isolation between testsCloses #121
Closes #117
Closes #118
Closes #119
Closes #120
Review
Solid integration test suite. All 7 tests pass with race detector. Lint and vet clean.
Tests:
TestHTTPServerHealthEndpoint— GET /health → 200TestHTTPServerWebhookEndpoint— POST valid JSON → 200TestHTTPServerSignatureVerification— POST without signature → 401TestConfigLoadAndValidate— config load + field verificationTestCommandExecution— shell command writing to temp file, output verifiedTestRuleMatching— rule matching with conditions + dot notationTestConcurrentRequests— 10 goroutines, sync.WaitGroup, buffered error channelDesign:
package testat top-level/testdirectory per Go conventions.writeTempConfighelper witht.TempDir(). File-based verification for command execution.No blocking issues.
APPROVED