]> Cypherpunks.ru repositories - gostls13.git/commit
internal/zstd: use dynamic path resolution for zstd in tests
authoraimuz <mr.imuz@gmail.com>
Wed, 8 Nov 2023 12:10:13 +0000 (12:10 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 8 Nov 2023 17:52:52 +0000 (17:52 +0000)
commit374a56ca33d48f0a70adbf3d94763fbcab5dd5a4
treedf86bc17ad857eb9f022ad55d03013edbed2da33
parenteebeca803d6df0d3434106d7f6ebb87229c54fd7
internal/zstd: use dynamic path resolution for zstd in tests

Abstract the hardcoded '/usr/bin/zstd' paths in fuzz and unit tests
to support systems where zstd may be installed at different locations.
The `findZstd` function uses `exec.LookPath` to locate the binary,
enhancing test portability.

Fixes #64000

Change-Id: I0ebe5bbcf3ddc6fccf176c13639ca9d855bcab87
GitHub-Last-Rev: c4dfe1139bdc2f4f3200f80b314a02b5df5cd995
GitHub-Pull-Request: golang/go#64002
Reviewed-on: https://go-review.googlesource.com/c/go/+/540522
Reviewed-by: Klaus Post <klauspost@gmail.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/internal/zstd/fuzz_test.go
src/internal/zstd/zstd_test.go