mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-19 23:03:08 +00:00
simplify testing
This commit is contained in:
1 parent
3582b9d869
commit
fc63f0432c
99 files changed
+726
-817
No files matched your search
@@ -7,16 +7,15 @@ import (
|
||||
|
||||
"github.com/v2ray/v2ray-core/proxy/internal/config"
|
||||
"github.com/v2ray/v2ray-core/proxy/socks"
|
||||
v2testing "github.com/v2ray/v2ray-core/testing"
|
||||
"github.com/v2ray/v2ray-core/testing/assert"
|
||||
)
|
||||
|
||||
func TestDefaultIPAddress(t *testing.T) {
|
||||
v2testing.Current(t)
|
||||
assert := assert.On(t)
|
||||
|
||||
socksConfig, err := config.CreateInboundConfig("socks", []byte(`{
|
||||
"auth": "noauth"
|
||||
}`))
|
||||
assert.Error(err).IsNil()
|
||||
assert.String(socksConfig.(*socks.Config).Address).Equals("127.0.0.1")
|
||||
assert.Address(socksConfig.(*socks.Config).Address).EqualsString("127.0.0.1")
|
||||
}
|
||||
Reference in new issue
Block a user