test: fixed the TestUnixSocket test on windows (#20)

This commit is contained in:
Jeff 2020-12-29 14:28:10 +08:00 committed by GitHub
parent 7742ff50e0
commit 1a0ef67aa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)