diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-25 22:08:34 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-25 22:08:34 +0300 |
| commit | 146ec97a51c1ab7ca96795310de80a0045db2699 (patch) | |
| tree | 67675b8f4975844744dc24bbcaaebc1c4c1caa9b /integrationtests/dmap_multiserver_test.go | |
| parent | 07a1147a7291938d2433efda5ecb2855cd1e3f18 (diff) | |
Add comprehensive test logging infrastructure to integration tests
- Add test logging infrastructure to track command execution and file comparisons
- Generate .log files for each test with command history and manual verification commands
- Ensure all temporary test files use .tmp suffix for consistency
- Clean up .tmp files before each test run (not after) for clean test starts
- Update .gitignore to exclude generated test artifacts (.log, .query files)
- Fix dserver test configurations to use .tmp suffix for output files
- Fix expected test outputs for dgrep context tests
This change improves test debugging and verification by providing detailed logs
of what each test does and allows manual verification of test results.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'integrationtests/dmap_multiserver_test.go')
| -rw-r--r-- | integrationtests/dmap_multiserver_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/integrationtests/dmap_multiserver_test.go b/integrationtests/dmap_multiserver_test.go index 44f38a9..dfcd398 100644 --- a/integrationtests/dmap_multiserver_test.go +++ b/integrationtests/dmap_multiserver_test.go @@ -14,6 +14,10 @@ import ( func TestDMapMultiServer(t *testing.T) { skipIfNotIntegrationTest(t) + cleanupTmpFiles(t) + testLogger := NewTestLogger("TestDMapMultiServer") + defer testLogger.WriteLogFile() + // Start three servers server1 := NewTestServer(t) server2 := NewTestServer(t) @@ -50,6 +54,7 @@ func TestDMapMultiServer(t *testing.T) { args.ExtraArgs = []string{"--query", query} ctx, cancel := createTestContextWithTimeout(t) + ctx = WithTestLogger(ctx, testLogger) defer cancel() _, err := runCommand(ctx, t, outFile, @@ -97,4 +102,7 @@ func TestDMapMultiServer(t *testing.T) { t.Logf("Successfully aggregated data from %d servers", 3) t.Logf("Top timestamp '%s' appeared %d times across all servers", fields[0], count) + + // Log file verification + testLogger.LogFileComparison(csvFile, "GROUP BY results", "content verification") }
\ No newline at end of file |
