test: un-skip label_replace and |> e2e tests, clarify unpack gap, add translator unit tests#410
Open
szibis wants to merge 3 commits into
Open
test: un-skip label_replace and |> e2e tests, clarify unpack gap, add translator unit tests#410szibis wants to merge 3 commits into
szibis wants to merge 3 commits into
Conversation
…ementations already exist
…unpack+filter The proxy gap claim in TestMissingOps_UnpackParser was inaccurate. The translator already correctly emits `| unpack_json | filter method:="GET"` for `| unpack | method="GET"` — the only real reason to skip those cases is that the e2e test data uses plain JSON, not Loki pack() format, so Loki returns empty results. Add three unit tests to translator_test.go confirming correct translation of bare `| unpack`, `| unpack | method="GET"`, and `| unpack | status >= 400`. Update the skip comment in missing_ops_compat_test.go to reflect the actual (sole) reason.
d3fbf02 to
da9c615
Compare
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.
Summary
t.SkipfromTestMissingOps_LabelReplace—label_replace()is fully implemented viatryTranslateLabelReplace(marker) +applyLabelReplace(matrix post-processing); the skip was a stale TODO placeholderskip: truefrominclude_patterninTestMissingOps_PatternMatchLineFilter—|>pattern-include filter is implemented attranslator.go:717viatranslatePatternLineFilter; a passing unit test already existed attranslator_test.go:220unpack_filter/unpack_status_filter— the translator already emits| unpack_json | filter method:="GET"correctly; the tests remain skipped only because the e2e test data is plain JSON (notpack()-format), which Loki's| unpackrequires| unpack,| unpack | method="GET", and| unpack | status >= 400— confirm correct VL output without a live stackTest Plan
go test ./internal/... -count=1— 3,887 passed, 0 failedgo test ./test/e2e-compat/... -count=1— requires live Loki+VL+proxy stack (CI)