Skip to content

Commit

Permalink
Add missed test for buildInfo command. (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekalinin authored Dec 20, 2021
1 parent 768e3c3 commit 630a7e9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions internal/handlers/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"

"github.com/FerretDB/FerretDB/internal/bson"
"github.com/FerretDB/FerretDB/internal/handlers/jsonb1"
"github.com/FerretDB/FerretDB/internal/handlers/shared"
"github.com/FerretDB/FerretDB/internal/handlers/sql"
Expand Down Expand Up @@ -413,6 +414,22 @@ func TestReadOnlyHandlers(t *testing.T) {
}

testCases := map[string]testCase{
"BuildInfo": {
req: types.MustMakeDocument(
"buildInfo", int32(1),
),
resp: types.MustMakeDocument(
"version", "5.0.42",
"versionArray", types.Array{
int32(5),
int32(0),
int32(42),
int32(0),
},
"maxBsonObjectSize", int32(bson.MaxDocumentLen),
"ok", float64(1),
),
},
"CountAllActors": {
req: types.MustMakeDocument(
"count", "actor",
Expand Down

0 comments on commit 630a7e9

Please sign in to comment.