Files
EdgeAPI/internal/db/models/reverse_proxy_dao_test.go

28 lines
598 B
Go
Raw Permalink Normal View History

2020-09-15 14:44:11 +08:00
package models
import (
_ "github.com/go-sql-driver/mysql"
2021-01-10 17:34:35 +08:00
"github.com/iwind/TeaGo/dbs"
2020-09-15 14:44:11 +08:00
"testing"
)
func TestReverseProxyDAO_ComposeReverseProxyConfig(t *testing.T) {
2021-01-10 17:34:35 +08:00
var tx *dbs.Tx
config, err := SharedReverseProxyDAO.ComposeReverseProxyConfig(tx, 1, nil, nil)
2020-09-15 14:44:11 +08:00
if err != nil {
t.Fatal(err)
}
t.Log(config)
}
func TestReverseProxyDAO_FindReverseProxyContainsOriginId(t *testing.T) {
dbs.NotifyReady()
var tx *dbs.Tx
reverseProxyId, err := SharedReverseProxyDAO.FindReverseProxyContainsOriginId(tx, 68)
if err != nil {
t.Fatal(err)
}
t.Log("reverseProxyId:", reverseProxyId)
}