logdb/logdb_test.go
huangsimin 8516f77157 test
2018-12-10 16:52:46 +08:00

25 lines
442 B
Go

package logdb
import (
"log"
"testing"
_ "github.com/go-sql-driver/mysql"
)
// charset: utf8mb4
// db: test_log
// hosts: [192.168.6.101, 192.168.6.102, 192.168.6.103, 192.168.6.104, 192.168.6.105]
// password: ag-spider-log
// port: 4000
// user: spider
func TestSelect(t *testing.T) {
logdb := NewLogDB("logdb.yaml")
logdb.Connect()
t.Error(logdb)
rows := logdb.Select("select * from log_spider limit 10;")
log.Println(rows)
}