自动升级WAF策略中SQL注入检测和XSS注入检测

This commit is contained in:
GoEdgeLab
2023-12-12 17:15:21 +08:00
parent f86c7dd80f
commit 154e45f9ee
2 changed files with 358 additions and 0 deletions

View File

@@ -289,3 +289,23 @@ func TestUpgradeSQLData_v1_2_10(t *testing.T) {
}
t.Log("ok")
}
func TestUpgradeSQLData_v1_3_2(t *testing.T) {
db, err := dbs.NewInstanceFromConfig(&dbs.DBConfig{
Driver: "mysql",
Dsn: "root:123456@tcp(127.0.0.1:3306)/db_edge?charset=utf8mb4&timeout=30s",
Prefix: "edge",
})
if err != nil {
t.Fatal(err)
}
defer func() {
_ = db.Close()
}()
err = upgradeV1_3_2(db)
if err != nil {
t.Fatal(err)
}
t.Log("ok")
}