mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-20 19:04:59 +00:00
MongoDB EXPLAIN JSON APIs (#454)
* WIP * PMM-4192 Updated MongoDB fingerprint SystemProfile has been changed to use the new bson.D from the official MongoDB driver instead of the old BsonD. Updated the fingerprinter module and all tests * PMM-4192 Updated MongoDB explain tests Updated test to use bson.D instead of BsonD * PMM-4192 Code clean-up * PMM-4192 Changes for CR * PMM-4192 Changes for CR * PMM-4192 Removed unused deps Co-authored-by: Carlos <cfsalguero@gmail.com>
This commit is contained in:
@@ -3,12 +3,9 @@ package sanitize
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/kr/pretty"
|
||||
)
|
||||
|
||||
func TestSanitizeHostnames(t *testing.T) {
|
||||
|
||||
want := []string{
|
||||
"top - 20:05:17 up 10 days, 16:27, 1 user, load average: 0.01, 0.15, 0.19",
|
||||
"Tasks: 115 total, 1 running, 114 sleeping, 0 stopped, 0 zombie",
|
||||
@@ -24,8 +21,6 @@ func TestSanitizeHostnames(t *testing.T) {
|
||||
copy(lines, want)
|
||||
sanitizeHostnames(lines)
|
||||
if !reflect.DeepEqual(lines, want) {
|
||||
pretty.Println(want)
|
||||
pretty.Println(lines)
|
||||
t.Error("structures don't match")
|
||||
}
|
||||
|
||||
@@ -48,7 +43,5 @@ func TestSanitizeHostnames(t *testing.T) {
|
||||
sanitizeHostnames(lines)
|
||||
if !reflect.DeepEqual(lines, want) {
|
||||
t.Error("structures don't match")
|
||||
pretty.Println(want)
|
||||
pretty.Println(lines)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user