WAF显示拦截日志

This commit is contained in:
GoEdgeLab
2020-11-02 14:37:05 +08:00
parent 8b2c709001
commit cd1109b387
7 changed files with 64 additions and 26 deletions

View File

@@ -2,6 +2,7 @@ package models
import (
_ "github.com/go-sql-driver/mysql"
"github.com/iwind/TeaGo/dbs"
"testing"
)
@@ -22,3 +23,19 @@ func TestHTTPWebDAO_UpdateWebShutdown(t *testing.T) {
t.Log("ok")
}
func TestHTTPWebDAO_FindAllWebIdsWithHTTPFirewallPolicyId(t *testing.T) {
dbs.NotifyReady()
webIds, err := SharedHTTPWebDAO.FindAllWebIdsWithHTTPFirewallPolicyId(9)
if err != nil {
t.Fatal(err)
}
t.Log("webIds:", webIds)
count, err := SharedServerDAO.CountEnabledServersWithWebIds(webIds)
if err != nil {
t.Fatal(err)
}
t.Log("count:", count)
}