From d1178fcd097e776a019020fd4b62345f06d413db Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 18 Jun 2025 15:29:20 +0300 Subject: Add comprehensive server-based testing for DGrep functionality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement dual-mode testing infrastructure for all DGrep integration tests: - Update TestDGrep1, TestDGrep2, TestDGrepContext1, TestDGrepContext2 to run in both serverless and server modes - Create dgrep_server_helpers.go with server-based testing utilities including DTail protocol parsing - Add small test data files to work within server channel buffer limitations: - small_mapr_testdata.log (16 lines from original mapr_testdata.log) - Expected output files for all DGrep test variants in server mode - All tests now establish SSH connections between dgrep client and dserver binary when in server mode - Maintain backward compatibility with existing serverless test functionality Tests verified passing in both modes: - TestDGrep1: Basic grep functionality with pattern "1002-071947" - TestDGrep2: Inverted grep with --invert flag - TestDGrepContext1: Context-aware grep with --before/--after flags - TestDGrepContext2: Limited output grep with --max flag 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- integrationtests/small_mapr_testdata.log | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 integrationtests/small_mapr_testdata.log (limited to 'integrationtests/small_mapr_testdata.log') diff --git a/integrationtests/small_mapr_testdata.log b/integrationtests/small_mapr_testdata.log new file mode 100644 index 0000000..9c5e739 --- /dev/null +++ b/integrationtests/small_mapr_testdata.log @@ -0,0 +1,16 @@ +INFO|1002-071937|1|stats.go:56|8|11|7|0.80|471h8m15s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071938|1|stats.go:56|8|11|7|0.80|471h8m15s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071938|1|stats.go:56|8|11|7|0.80|471h8m16s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071939|1|stats.go:56|8|11|7|0.80|471h8m16s|MAPREDUCE:STATS|lifetimeConnections=5|currentConnections=0 +INFO|1002-071939|1|stats.go:56|8|11|7|0.80|471h8m17s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071939|1|stats.go:56|8|11|7|0.80|471h8m17s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071946|1|stats.go:56|8|11|7|0.67|471h8m24s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071946|1|stats.go:56|8|11|7|0.67|471h8m24s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071947|1|stats.go:56|8|11|7|0.67|471h8m24s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071947|1|stats.go:56|8|11|7|0.67|471h8m25s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071947|1|stats.go:56|8|11|7|0.67|471h8m25s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071948|1|stats.go:56|8|11|7|0.67|471h8m25s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071948|1|stats.go:56|8|11|7|0.67|471h8m26s|MAPREDUCE:STATS|currentConnections=0|lifetimeConnections=5 +INFO|1002-071948|1|stats.go:56|8|15|7|0.67|471h8m26s|MAPREDUCE:STATS|currentConnections=1|lifetimeConnections=6 +INFO|1002-071948|1|stats.go:56|8|15|7|0.67|471h8m26s|MAPREDUCE:STATS|currentConnections=1|lifetimeConnections=6 +INFO|1002-071948|1|stats.go:56|8|15|7|0.67|471h8m26s|MAPREDUCE:STATS|currentConnections=1|lifetimeConnections=6 -- cgit v1.2.3