Skip to content

Commit

Permalink
Fix test for collstats (#233)
Browse files Browse the repository at this point in the history
Fixed typo in the database name for `CollStats` test (as well as related statistics).
  • Loading branch information
ekalinin committed Jan 6, 2022
1 parent a359535 commit 9ccdcd4
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions internal/handlers/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,29 +438,34 @@ func TestReadOnlyHandlers(t *testing.T) {
"ok", float64(1),
),
},

"CollStats": {
req: types.MustMakeDocument(
"collstats", "film",
),
reqSetDB: true,
resp: types.MustMakeDocument(
"ns", "manila.film",
"ns", "monila.film",
"count", int64(1_000),
"size", int64(704512),
"storageSize", int64(450560),
"totalIndexSize", int64(221184),
"totalSize", int64(704512),
"size", int64(1_236_992),
"storageSize", int64(1_204_224),
"totalIndexSize", int64(0),
"totalSize", int64(1_236_992),
"scaleFactor", int64(1),
"ok", float64(1),
),
compareFunc: func(t testing.TB, req types.Document, actual, expected types.CompositeType) {
db, err := req.Get("$db")
require.NoError(t, err)
if db.(string) == "manila" {
if db.(string) == "monila" {
testutil.CompareAndSetByPathNum(t, expected, actual, 30_000, "size")
testutil.CompareAndSetByPathNum(t, expected, actual, 30_000, "storageSize")
testutil.CompareAndSetByPathNum(t, expected, actual, 30_000, "totalSize")
assert.Equal(t, expected, actual)
}
},
},

"CountAllActors": {
req: types.MustMakeDocument(
"count", "actor",
Expand Down

0 comments on commit 9ccdcd4

Please sign in to comment.