test: fixed the TestUnixSocket test on windows

This commit is contained in:
laojianzi 2020-12-29 12:07:15 +08:00
parent 7742ff50e0
commit d04b8997fe

View File

@ -14,6 +14,7 @@ import (
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"sync"
"testing"
"time"
@ -146,7 +147,7 @@ func TestRunWithPort(t *testing.T) {
func TestUnixSocket(t *testing.T) {
router := New()
unixTestSocket := "/tmp/unix_unit_test"
unixTestSocket := filepath.Join(os.TempDir(), "unix_unit_test")
defer os.Remove(unixTestSocket)