Skip to content

test: un-skip label_replace and |> e2e tests, clarify unpack gap, add translator unit tests#410

Open
szibis wants to merge 3 commits into
mainfrom
feat/translator-gaps
Open

test: un-skip label_replace and |> e2e tests, clarify unpack gap, add translator unit tests#410
szibis wants to merge 3 commits into
mainfrom
feat/translator-gaps

Conversation

@szibis
Copy link
Copy Markdown
Collaborator

@szibis szibis commented May 25, 2026

Summary

  • Remove stale t.Skip from TestMissingOps_LabelReplacelabel_replace() is fully implemented via tryTranslateLabelReplace (marker) + applyLabelReplace (matrix post-processing); the skip was a stale TODO placeholder
  • Remove skip: true from include_pattern in TestMissingOps_PatternMatchLineFilter|> pattern-include filter is implemented at translator.go:717 via translatePatternLineFilter; a passing unit test already existed at translator_test.go:220
  • Correct false "proxy gap" claim on unpack_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 (not pack()-format), which Loki's | unpack requires
  • Add 3 translator unit tests for | unpack, | unpack | method="GET", and | unpack | status >= 400 — confirm correct VL output without a live stack

Test Plan

  • go test ./internal/... -count=1 — 3,887 passed, 0 failed
  • go test ./test/e2e-compat/... -count=1 — requires live Loki+VL+proxy stack (CI)

szibis added 3 commits May 25, 2026 16:41
…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.
@szibis szibis force-pushed the feat/translator-gaps branch from d3fbf02 to da9c615 Compare May 25, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant