Add extensive tests for CLI, parser, query, server, and Badger storage behavior#41
Draft
Add extensive tests for CLI, parser, query, server, and Badger storage behavior#41
Conversation
Release Label SuggestionSuggested label: You can change this by updating PR labels before merge. Allowed labels (exactly one required):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
cmd/peek/main_test.gowith a broad suite of tests coveringvalidateNoPositionalArgs,parseDuration,expandPath, DB subcommands (runDbStats,runDbClean),runServerMode,runCollectMode, CLI flows viamain, and helper utilities likecaptureStdoutandisStdinPiped.pkg/parser/parser_test.gofor style cleanup and added tests includingTestParseLogfmtEdgeCasesandTestLogfmtParser_ParsesTimestampField, plus existing parser behavior and ID generation checks.pkg/query/lucene_behavior_test.gowith tests for extended duration parsing, multiple time value formats, query matching semantics, token reading, range parsing, and filter edge cases.pkg/server/server_test.goto exercise HTTP handlers, WebSocket subscribe/broadcast flows, static asset handlers, broadcast worker behavior, and error handling when storage is unavailable.pkg/storage/badger_behavior_test.goto validate storage behaviors including time-range queries, field discovery, deletion APIs, subscription notifications, compaction/retention helpers, scan error propagation, and stats/expandPath behavior.Testing
go test ./...across the repository and all new and existing tests completed successfully.Codex Task