mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-06 12:52:53 +02:00
21 lines
320 B
Go
21 lines
320 B
Go
//go:build darwin
|
|
|
|
package testenv
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
// macos temp directory names are too long
|
|
// https://github.com/golang/go/issues/62614
|
|
func tempDir(t testing.TB) string {
|
|
dir, err := os.MkdirTemp("", "test")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Cleanup(func() {
|
|
os.RemoveAll(dir)
|
|
})
|
|
return dir
|
|
}
|