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:
Carlos Salguero
2020-07-08 10:25:12 -03:00
committed by GitHub
parent de27179da8
commit c7eed08e33
205 changed files with 481 additions and 13385 deletions

View File

@@ -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)
}
}