Skip to content

Commit 82b7dd1

Browse files
authored
GODRIVER-2336 Skip strict stable API count example (#877)
1 parent d307af8 commit 82b7dd1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/documentation_examples/examples_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@ func TestDocumentationExamples(t *testing.T) {
5151
documentation_examples.StableAPIExamples()
5252

5353
// Because it uses RunCommand with an apiVersion, the strict count example can only be
54-
// run on 5.0+ without auth.
54+
// run on 5.0+ without auth. It also cannot be run on 6.0+ since the count command was
55+
// added to API version 1 and no longer results in an error when strict is enabled.
5556
ver, err := getServerVersion(ctx, client)
5657
require.NoError(t, err, "getServerVersion error: %v", err)
5758
auth := os.Getenv("AUTH") == "auth"
58-
if testutil.CompareVersions(t, ver, "5.0") >= 0 && !auth {
59+
if testutil.CompareVersions(t, ver, "5.0") >= 0 && testutil.CompareVersions(t, ver, "6.0") < 0 && !auth {
5960
documentation_examples.StableAPIStrictCountExample(t)
6061
} else {
6162
t.Log("skipping stable API strict count example")

0 commit comments

Comments
 (0)