Initial commit (code only without large binaries)
This commit is contained in:
27
EdgeAPI/internal/db/models/reverse_proxy_dao_test.go
Normal file
27
EdgeAPI/internal/db/models/reverse_proxy_dao_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestReverseProxyDAO_ComposeReverseProxyConfig(t *testing.T) {
|
||||
var tx *dbs.Tx
|
||||
config, err := SharedReverseProxyDAO.ComposeReverseProxyConfig(tx, 1, nil, nil)
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user