mirror of https://github.com/gofiber/fiber.git
🩹 Update IPv6 test
parent
2893c13718
commit
29c9a97556
|
@ -4,6 +4,7 @@ import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -67,11 +68,14 @@ func Test_App_Prefork_TCP6_Addr(t *testing.T) {
|
||||||
app.Settings.DisableStartupMessage = true
|
app.Settings.DisableStartupMessage = true
|
||||||
|
|
||||||
app.init()
|
app.init()
|
||||||
utils.AssertEqual(t, "listen: tcp6 is not supported when prefork is enabled", app.Listen("[::1]:3000").Error())
|
|
||||||
|
|
||||||
app.Settings.Network = "tcp6"
|
go func() {
|
||||||
app.init()
|
time.Sleep(1000 * time.Millisecond)
|
||||||
utils.AssertEqual(t, "listen: tcp6 is not supported when prefork is enabled", app.Listen(":3000").Error())
|
utils.AssertEqual(t, nil, app.Shutdown())
|
||||||
|
}()
|
||||||
|
|
||||||
|
err := app.Listen("[::1]:3200")
|
||||||
|
utils.AssertEqual(t, true, strings.Contains(err.Error(), "exit status"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_App_Prefork_Child_Process_Never_Show_Startup_Message(t *testing.T) {
|
func Test_App_Prefork_Child_Process_Never_Show_Startup_Message(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue