summaryrefslogtreecommitdiff
path: root/tests/e2e/fuzz_args_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/e2e/fuzz_args_test.go')
-rw-r--r--tests/e2e/fuzz_args_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/e2e/fuzz_args_test.go b/tests/e2e/fuzz_args_test.go
index 0d4a45b..0d71e0e 100644
--- a/tests/e2e/fuzz_args_test.go
+++ b/tests/e2e/fuzz_args_test.go
@@ -8,8 +8,6 @@ import (
)
func FuzzArgumentIntegrity(f *testing.F) {
- binaryPath := GetBinaryPath()
-
f.Add("; rm -rf /")
f.Add("$(whoami)")
f.Add(" spaced ")
@@ -17,6 +15,11 @@ func FuzzArgumentIntegrity(f *testing.F) {
f.Add("\x00null\x00")
f.Fuzz(func(t *testing.T, payload string) {
+ binaryPath, err := GetBinaryPath()
+ if err != nil {
+ t.Skip("Skipping E2E fuzz test: wg-wrap binary not found (WG_WRAP_BIN not set)")
+ }
+
out, err := exec.Command(binaryPath, "test-args", payload).CombinedOutput()
if strings.Contains(payload, "\x00") {