mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-15 00:40:26 +08:00
允许用户调用修改TCP/TLS接口;新增server.tcp.port功能;增加检查端口是否使用接口
This commit is contained in:
@@ -86,4 +86,23 @@ func TestServerDAO_FindAllEnabledServerIdsWithSSLPolicyIds(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("serverIds:", serverIds)
|
||||
}
|
||||
}
|
||||
|
||||
func TestServerDAO_CheckPortIsUsing(t *testing.T) {
|
||||
dbs.NotifyReady()
|
||||
var tx *dbs.Tx
|
||||
//{
|
||||
// isUsing, err := SharedServerDAO.CheckPortIsUsing(tx, 18, 1234, 0, "")
|
||||
// if err != nil {
|
||||
// t.Fatal(err)
|
||||
// }
|
||||
// t.Log("isUsing:", isUsing)
|
||||
//}
|
||||
{
|
||||
isUsing, err := SharedServerDAO.CheckPortIsUsing(tx, 18, 1234, 44, "tcp")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("isUsing:", isUsing)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user