dns/tmpdir_test.go
Patryk Małek 7fadba7515
tests: skip unix socket tests for non *nix OSes (#1443)
* tests: fix unix socket tests on darwin

* tests: add test temp dir implementation for darwin and non darwin
2023-06-16 17:57:59 +02:00

17 lines
350 B
Go

//go:build !darwin
package dns
import (
"path/filepath"
"testing"
)
// tempDir creates a temporary directory for tests and returns a file path as
// a result of concatenation of said temporary directory path and provided filename.
func tempFile(t *testing.T, filename string) string {
t.Helper()
return filepath.Join(t.TempDir(), filename)
}