@@ -32,9 +32,9 @@ func TestScrapeSlaveStatus(t *testing.T) {
32
32
defer db .Close ()
33
33
inst := & instance {db : db }
34
34
35
- columns := []string {"Master_Host" , "Read_Master_Log_Pos" , "Slave_IO_Running" , "Slave_SQL_Running" , "Seconds_Behind_Master" }
35
+ columns := []string {"Master_Host" , "Read_Master_Log_Pos" , "Slave_IO_Running" , "Slave_SQL_Running" , "Seconds_Behind_Master" , "Gtid_IO_Pos" }
36
36
rows := sqlmock .NewRows (columns ).
37
- AddRow ("127.0.0.1" , "1" , "Connecting" , "Yes" , "2" )
37
+ AddRow ("127.0.0.1" , "1" , "Connecting" , "Yes" , "2" , "0-1-2,3-4-5" )
38
38
mock .ExpectQuery (sanitizeQuery ("SHOW SLAVE STATUS" )).WillReturnRows (rows )
39
39
40
40
ch := make (chan prometheus.Metric )
@@ -50,6 +50,8 @@ func TestScrapeSlaveStatus(t *testing.T) {
50
50
{labels : labelMap {"channel_name" : "" , "connection_name" : "" , "master_host" : "127.0.0.1" , "master_uuid" : "" }, value : 0 , metricType : dto .MetricType_UNTYPED },
51
51
{labels : labelMap {"channel_name" : "" , "connection_name" : "" , "master_host" : "127.0.0.1" , "master_uuid" : "" }, value : 1 , metricType : dto .MetricType_UNTYPED },
52
52
{labels : labelMap {"channel_name" : "" , "connection_name" : "" , "master_host" : "127.0.0.1" , "master_uuid" : "" }, value : 2 , metricType : dto .MetricType_UNTYPED },
53
+ {labels : labelMap {"channel_name" : "" , "connection_name" : "" , "master_host" : "127.0.0.1" , "master_uuid" : "" , "domain_id" : "0" , "server_id" : "1" }, value : 2 , metricType : dto .MetricType_GAUGE },
54
+ {labels : labelMap {"channel_name" : "" , "connection_name" : "" , "master_host" : "127.0.0.1" , "master_uuid" : "" , "domain_id" : "3" , "server_id" : "4" }, value : 5 , metricType : dto .MetricType_GAUGE },
53
55
}
54
56
convey .Convey ("Metrics comparison" , t , func () {
55
57
for _ , expect := range counterExpected {
0 commit comments