Debian Codegraph @

infra/conf/http_test.go

raw symbols SCIP
1 package conf_testscip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf_test`/
2
3 import (
4 "testingscip-go gomod github.com/golang/go/src go1.15 testing/"
5
6 . "v2ray.com/core/infra/confscip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf`/"
7 "v2ray.com/core/proxy/httpscip-go gomod v2ray.com/core . `v2ray.com/core/proxy/http`/"
8 )
9
10 func TestHTTPServerConfigscip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf_test`/TestHTTPServerConfig().(t *testingscip-go gomod github.com/golang/go/src go1.15 testing/.Tscip-go gomod github.com/golang/go/src go1.15 testing/T#) {
11 creator := func() Buildablescip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf`/Buildable# {
12 return new(HTTPServerConfigscip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf`/HTTPServerConfig#)
13 }
14
15 runMultiTestCasescip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf_test`/runMultiTestCase().(t, []TestCasescip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf_test`/TestCase#{
16 {
17 Inputscip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf_test`/TestCase#Input.: `{
18 "timeout": 10,
19 "accounts": [
20 {
21 "user": "my-username",
22 "pass": "my-password"
23 }
24 ],
25 "allowTransparent": true,
26 "userLevel": 1
27 }`,
28 Parserscip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf_test`/TestCase#Parser.: loadJSONscip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf_test`/loadJSON().(creator),
29 Outputscip-go gomod v2ray.com/core . `v2ray.com/core/infra/conf_test`/TestCase#Output.: &httpscip-go gomod v2ray.com/core . `v2ray.com/core/proxy/http`/.ServerConfigscip-go gomod v2ray.com/core . `v2ray.com/core/proxy/http`/ServerConfig#{
30 Accountsscip-go gomod v2ray.com/core . `v2ray.com/core/proxy/http`/ServerConfig#Accounts.: map[string]string{
31 "my-username": "my-password",
32 },
33 AllowTransparentscip-go gomod v2ray.com/core . `v2ray.com/core/proxy/http`/ServerConfig#AllowTransparent.: true,
34 UserLevelscip-go gomod v2ray.com/core . `v2ray.com/core/proxy/http`/ServerConfig#UserLevel.: 1,
35 Timeoutscip-go gomod v2ray.com/core . `v2ray.com/core/proxy/http`/ServerConfig#Timeout.: 10,
36 },
37 },
38 })
39 }