实现URL跳转功能

This commit is contained in:
GoEdgeLab
2021-01-10 17:34:35 +08:00
parent 87828af844
commit af5584c768
18 changed files with 381 additions and 62 deletions

View File

@@ -2,14 +2,16 @@ package models
import (
_ "github.com/go-sql-driver/mysql"
"github.com/iwind/TeaGo/dbs"
"runtime"
"testing"
)
func TestAPINodeDAO_FindEnabledAPINodeIdWithAddr(t *testing.T) {
dao := NewAPINodeDAO()
var tx *dbs.Tx
{
apiNodeId, err := dao.FindEnabledAPINodeIdWithAddr("http", "127.0.0.1", 123)
apiNodeId, err := dao.FindEnabledAPINodeIdWithAddr(tx, "http", "127.0.0.1", 123)
if err != nil {
t.Fatal(err)
}
@@ -17,7 +19,7 @@ func TestAPINodeDAO_FindEnabledAPINodeIdWithAddr(t *testing.T) {
}
{
apiNodeId, err := dao.FindEnabledAPINodeIdWithAddr("http", "127.0.0.1", 8003)
apiNodeId, err := dao.FindEnabledAPINodeIdWithAddr(tx, "http", "127.0.0.1", 8003)
if err != nil {
t.Fatal(err)
}