0.3.0 unit tests: mailchimp, memcached, mongodb
This commit is contained in:
@@ -141,7 +141,7 @@ func (m *Memcached) gatherServer(
|
||||
for _, key := range sendMetrics {
|
||||
if value, ok := values[key]; ok {
|
||||
// Mostly it is the number
|
||||
if iValue, errParse := strconv.ParseInt(value, 10, 64); errParse != nil {
|
||||
if iValue, errParse := strconv.ParseInt(value, 10, 64); errParse == nil {
|
||||
fields[key] = iValue
|
||||
} else {
|
||||
fields[key] = value
|
||||
|
||||
@@ -32,7 +32,7 @@ func TestMemcachedGeneratesMetrics(t *testing.T) {
|
||||
"bytes_read", "bytes_written", "threads", "conn_yields"}
|
||||
|
||||
for _, metric := range intMetrics {
|
||||
assert.True(t, acc.HasIntValue(metric), metric)
|
||||
assert.True(t, acc.HasIntField("memcached", metric), metric)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user