0.3.0 unit tests: aerospike, apache, bcache
This commit is contained in:
@@ -68,8 +68,8 @@ func TestDiskStats(t *testing.T) {
|
||||
"inodes_free": uint64(468), //tags2)
|
||||
"inodes_used": uint64(2000), //tags2)
|
||||
}
|
||||
acc.AssertContainsFields(t, "disk", fields1, tags1)
|
||||
acc.AssertContainsFields(t, "disk", fields2, tags2)
|
||||
acc.AssertContainsTaggedFields(t, "disk", fields1, tags1)
|
||||
acc.AssertContainsTaggedFields(t, "disk", fields2, tags2)
|
||||
|
||||
// We expect 6 more DiskPoints to show up with an explicit match on "/"
|
||||
// and /home not matching the /dev in Mountpoints
|
||||
|
||||
@@ -116,5 +116,5 @@ func TestDockerStats_GenerateStats(t *testing.T) {
|
||||
"total_unevictable": uint64(27),
|
||||
}
|
||||
|
||||
acc.AssertContainsFields(t, "docker", fields, dockertags)
|
||||
acc.AssertContainsTaggedFields(t, "docker", fields, dockertags)
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func TestMemStats(t *testing.T) {
|
||||
"cached": uint64(0),
|
||||
"buffered": uint64(0),
|
||||
}
|
||||
acc.AssertContainsFields(t, "mem", memfields, nil)
|
||||
acc.AssertContainsTaggedFields(t, "mem", memfields, make(map[string]string))
|
||||
|
||||
acc.Points = nil
|
||||
|
||||
@@ -68,5 +68,5 @@ func TestMemStats(t *testing.T) {
|
||||
"in": uint64(7),
|
||||
"out": uint64(830),
|
||||
}
|
||||
acc.AssertContainsFields(t, "swap", swapfields, nil)
|
||||
acc.AssertContainsTaggedFields(t, "swap", swapfields, make(map[string]string))
|
||||
}
|
||||
|
||||
@@ -74,13 +74,13 @@ func TestNetStats(t *testing.T) {
|
||||
"drop_in": uint64(7),
|
||||
"drop_out": uint64(1),
|
||||
}
|
||||
acc.AssertContainsFields(t, "net", fields1, ntags)
|
||||
acc.AssertContainsTaggedFields(t, "net", fields1, ntags)
|
||||
|
||||
fields2 := map[string]interface{}{
|
||||
"udp_noports": int64(892592),
|
||||
"udp_indatagrams": int64(4655),
|
||||
}
|
||||
acc.AssertContainsFields(t, "net", fields2, nil)
|
||||
acc.AssertContainsTaggedFields(t, "net", fields2, make(map[string]string))
|
||||
|
||||
acc.Points = nil
|
||||
|
||||
@@ -102,5 +102,5 @@ func TestNetStats(t *testing.T) {
|
||||
"tcp_none": 0,
|
||||
"udp_socket": 1,
|
||||
}
|
||||
acc.AssertContainsFields(t, "netstat", fields3, nil)
|
||||
acc.AssertContainsTaggedFields(t, "netstat", fields3, make(map[string]string))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user