forked from pneymrl2f/nightingale
master
parent
9c1c894e29
commit
005dc47868
@ -0,0 +1,20 @@
|
|||||||
|
package mysql
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/didi/nightingale/src/modules/monapi/plugins"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestCollect(t *testing.T) {
|
||||||
|
dsn := os.Getenv("MYSQL_DSN")
|
||||||
|
if dsn == "" {
|
||||||
|
t.Error("unable to get DATA_SOURCE_NAME from environment")
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins.PluginTest(t, &MysqlRule{
|
||||||
|
Servers: []string{dsn},
|
||||||
|
GatherSlaveStatus: true,
|
||||||
|
})
|
||||||
|
}
|
Loading…
Reference in new issue