mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-19 00:43:58 +00:00
Merge branch 'pt-3.0.5-pre-release' of percona.github.com:percona/percona-toolkit into pt-3.0.5-pre-release
This commit is contained in:
@@ -214,7 +214,7 @@ func TestStatsSingle(t *testing.T) {
|
|||||||
t.Fatalf("cannot load expected data %s: %s", dirExpect+f, err)
|
t.Fatalf("cannot load expected data %s: %s", dirExpect+f, err)
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(got, expect) {
|
if !reflect.DeepEqual(got, expect) {
|
||||||
t.Errorf("s.Queries() = %v, want %v", got, expect)
|
t.Errorf("s.Queries() = %#v, want %#v", got, expect)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -261,7 +261,7 @@ func TestStatsAll(t *testing.T) {
|
|||||||
t.Fatalf("cannot load expected data %s: %s", f, err)
|
t.Fatalf("cannot load expected data %s: %s", f, err)
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(got, expect) {
|
if !reflect.DeepEqual(got, expect) {
|
||||||
t.Errorf("s.Queries() = %v, want %v", got, expect)
|
t.Errorf("s.Queries() = %#v, want %#v", got, expect)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,7 +343,7 @@ func TestAvailableMetrics(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !reflect.DeepEqual(got, expect) {
|
if !reflect.DeepEqual(got, expect) {
|
||||||
t.Errorf("s.Queries() = %v, want %v", got, expect)
|
t.Errorf("s.Queries() = %#v, want %#v", got, expect)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@@ -18,7 +18,6 @@ import (
|
|||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/kr/pretty"
|
|
||||||
"github.com/pborman/getopt/v2"
|
"github.com/pborman/getopt/v2"
|
||||||
"github.com/percona/percona-toolkit/src/go/lib/profiling"
|
"github.com/percona/percona-toolkit/src/go/lib/profiling"
|
||||||
"github.com/percona/percona-toolkit/src/go/lib/tutil"
|
"github.com/percona/percona-toolkit/src/go/lib/tutil"
|
||||||
@@ -404,10 +403,6 @@ func testAllOperationsTemplate(t *testing.T, data Data) {
|
|||||||
|
|
||||||
expected := `Profiler is disabled for the "test" database but there are \s*[0-9]+ documents in the system.profile collection.
|
expected := `Profiler is disabled for the "test" database but there are \s*[0-9]+ documents in the system.profile collection.
|
||||||
Using those documents for the stats
|
Using those documents for the stats
|
||||||
pt-mongodb-query-digest .+
|
|
||||||
Host: ` + data.url + `
|
|
||||||
Skipping profiled queries on these collections: \[system\.profile\]
|
|
||||||
|
|
||||||
|
|
||||||
# Totals
|
# Totals
|
||||||
# Ratio [0-9\.]+ \(docs scanned/returned\)
|
# Ratio [0-9\.]+ \(docs scanned/returned\)
|
||||||
@@ -450,9 +445,7 @@ Skipping profiled queries on these collections: \[system\.profile\]
|
|||||||
|
|
||||||
expected += buf.String()
|
expected += buf.String()
|
||||||
}
|
}
|
||||||
fmt.Println("====================================================================================================")
|
expected += "\n" // Looks like we expect additional line
|
||||||
pretty.Println(string(output))
|
|
||||||
fmt.Println("====================================================================================================")
|
|
||||||
|
|
||||||
assertRegexpLines(t, expected, string(output))
|
assertRegexpLines(t, expected, string(output))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user