自建DNS增加全局配置

This commit is contained in:
GoEdgeLab
2021-08-05 16:08:01 +08:00
parent 30769f4cd6
commit ec19842bf5
4 changed files with 79 additions and 5 deletions

View File

@@ -35,3 +35,21 @@ func TestSQLExecutor_checkMetricItems(t *testing.T) {
}
t.Log("ok")
}
func TestSQLExecutor_checkNS(t *testing.T) {
executor := NewSQLExecutor(&dbs.DBConfig{
Driver: "mysql",
Prefix: "edge",
Dsn: "root:123456@tcp(127.0.0.1:3306)/db_edge_new?charset=utf8mb4&multiStatements=true",
})
db, err := dbs.NewInstanceFromConfig(executor.dbConfig)
if err != nil {
t.Fatal(err)
}
err = executor.checkNS(db)
if err != nil {
t.Fatal(err)
}
t.Log("ok")
}