File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
examples/documentation_examples Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -2905,6 +2905,10 @@ func StableAPIDeprecationErrorsExample() {
2905
2905
// StableAPIStrictCountExample is an example of using CountDocuments instead of a traditional count
2906
2906
// with a strict stable API since the count command does not belong to API version 1.
2907
2907
func StableAPIStrictCountExample (t * testing.T ) {
2908
+ // TODO(GODRIVER-2482): The "count" command is now part of Stable API v1 in MongoDB v5.0.x and
2909
+ // TODO v6.x, so this example no longer works correctly in any CI tested server version. Rewrite
2910
+ // TODO this example with a command that is not part of Stable API v1. For now, this example
2911
+ // TODO test is always skipped.
2908
2912
uri := mtest .ClusterURI ()
2909
2913
2910
2914
serverAPIOptions := options .ServerAPI (options .ServerAPIVersion1 ).SetStrict (true )
Original file line number Diff line number Diff line change @@ -92,11 +92,12 @@ func TestDocumentationExamples(t *testing.T) {
92
92
mt := mtest .New (t )
93
93
defer mt .Close ()
94
94
95
- // Because it uses RunCommand with an apiVersion, the strict count example can only be
96
- // run on 5.0+ without auth. It also cannot be run on 6.0+ since the count command was
97
- // added to API version 1 and no longer results in an error when strict is enabled.
98
- mtOpts := mtest .NewOptions ().MinServerVersion ("5.0" ).MaxServerVersion ("5.3" )
95
+ // Stable API is supported in 5.0+
96
+ mtOpts := mtest .NewOptions ().MinServerVersion ("5.0" )
99
97
mt .RunOpts ("StableAPIStrictCountExample" , mtOpts , func (mt * mtest.T ) {
98
+ // TODO(GODRIVER-2482): Unskip when this test is rewritten to work with Stable API v1.
99
+ mt .Skip (`skipping because "count" is now part of Stable API v1; see GODRIVER-2482` )
100
+
100
101
documentation_examples .StableAPIStrictCountExample (mt .T )
101
102
})
102
103
You can’t perform that action at this time.
0 commit comments