Skip to content

Conversation

@90ashish
Copy link

What does this PR do?

Adds unit tests for the promhttp/zstd package to validate that importing the
package correctly enables zstd support and that the registered writer
produces valid, decompressible output.

Why is this needed?

The promhttp/zstd package relies on an init()-time side effect to register
zstd compression support via internal.NewZstdWriter. Prior to this change,
this behavior was untested.

These tests:

  • Assert that zstd support is registered when the package is imported
  • Verify that the writer returned by NewZstdWriter produces valid zstd output

Impact

  • No production code changes
  • Improves test coverage and confidence in zstd support
  • No API or behavior changes

Notes for reviewers

The tests intentionally focus on the package’s side-effect contract
(blank import enables zstd support) and avoid any changes to existing logic.

@90ashish 90ashish force-pushed the promhttp-zstd-tests branch from 8831995 to 9ae4de1 Compare December 20, 2025 17:37
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