mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 21:32:11 +08:00
Ignore Unix Socket tests on windows OS
This commit is contained in:
parent
3900df04d2
commit
d1dbeb02cb
@ -7,11 +7,13 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"runtime"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"net/http/httptest"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func testRequest(t *testing.T, url string) {
|
||||
@ -77,6 +79,10 @@ func TestRunWithPort(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUnixSocket(t *testing.T) {
|
||||
if runtime.GOOS == "windows" {
|
||||
return
|
||||
}
|
||||
|
||||
router := New()
|
||||
|
||||
go func() {
|
||||
@ -101,6 +107,10 @@ func TestUnixSocket(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBadUnixSocket(t *testing.T) {
|
||||
if runtime.GOOS == "windows" {
|
||||
return
|
||||
}
|
||||
|
||||
router := New()
|
||||
assert.Error(t, router.RunUnix("#/tmp/unix_unit_test"))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user