Files
EdgeAPI/internal/db/models/http_firewall_rule_set_dao_test.go
GoEdgeLab 5a17ae9d79 v1.4.1
2024-07-27 14:15:25 +08:00

23 lines
436 B
Go

package models
import (
"testing"
"time"
_ "github.com/go-sql-driver/mysql"
"github.com/iwind/TeaGo/dbs"
)
func TestHTTPFirewallRuleSetDAO_FindRuleSetIdWithRuleId(t *testing.T) {
dbs.NotifyReady()
var tx *dbs.Tx
before := time.Now()
setId, err := SharedHTTPFirewallRuleSetDAO.FindEnabledRuleSetIdWithRuleId(tx, 20)
if err != nil {
t.Fatal(err)
}
t.Log("setId:", setId)
t.Log(time.Since(before).Seconds()*1000, "ms")
}