mirror of https://github.com/bjdgyc/anylink.git
修复go test报错
This commit is contained in:
parent
2fc3c33880
commit
7554876259
.github/workflows
docker
index_template
server
|
@ -40,6 +40,7 @@ jobs:
|
|||
- name: Test coverage
|
||||
run: |
|
||||
cd server
|
||||
go test ./...
|
||||
go test -race -coverprofile=coverage.txt -covermode=atomic -v ./...
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
|
|
|
@ -39,7 +39,7 @@ COPY docker/init_release.sh /tmp/
|
|||
COPY --from=builder_golang /server/anylink /app/
|
||||
COPY docker/docker_entrypoint.sh server/bridge-init.sh ./README.md ./LICENSE /app/
|
||||
COPY ./deploy /app/deploy
|
||||
COPY ./home /app/home
|
||||
COPY ./index_template /app/index_template
|
||||
COPY ./server/conf /app/conf
|
||||
|
||||
#TODO 本地打包时使用镜像
|
||||
|
|
|
@ -73,6 +73,7 @@ mtu = 1460
|
|||
default_domain = "example.com"
|
||||
#default_domain = "example.com abc.example.com"
|
||||
|
||||
#空闲链接超时时间(秒)-超时后断开链接,0关闭此功能
|
||||
idle_timeout = 7200
|
||||
#session过期时间,用于断线重连,0永不过期
|
||||
session_timeout = 3600
|
||||
|
|
|
@ -50,7 +50,7 @@ func startTls() {
|
|||
MinVersion: tls.VersionTLS12,
|
||||
CipherSuites: selectedCipherSuites,
|
||||
GetCertificate: func(chi *tls.ClientHelloInfo) (*tls.Certificate, error) {
|
||||
base.Trace("GetCertificate", chi.ServerName)
|
||||
base.Trace("GetCertificate ServerName", chi.ServerName)
|
||||
return dbdata.GetCertificateBySNI(chi.ServerName)
|
||||
},
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ func TestConnSession(t *testing.T) {
|
|||
sess.MacAddr = "00:15:5d:50:14:43"
|
||||
|
||||
cSess := sess.NewConn()
|
||||
base.Info("cSess", cSess)
|
||||
// base.Info("cSess", cSess)
|
||||
|
||||
err := cSess.RateLimit(100, true)
|
||||
ast.Nil(err)
|
||||
|
@ -60,4 +60,7 @@ func TestConnSession(t *testing.T) {
|
|||
ast.Equal(cmpName, "")
|
||||
|
||||
cSess.Close()
|
||||
|
||||
// 等待日志执行完成
|
||||
time.Sleep(time.Second * 10)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue