From ec074010d81f72826fdba230ef6cda1bbf034a27 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Tue, 24 Jan 2023 14:38:48 -0800 Subject: [PATCH] PYTHON-3523 Resync unified test format tests for getnonce (#1141) --- test/test_auth.py | 4 +++- .../valid-pass/observeSensitiveCommands.json | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/test/test_auth.py b/test/test_auth.py index 9d80f06c0..7db224774 100644 --- a/test/test_auth.py +++ b/test/test_auth.py @@ -581,7 +581,9 @@ class TestSCRAM(IntegrationTest): coll.insert_one({"_id": 1}) # The first thread to call find() will authenticate - coll = rs_or_single_client().db.test + client = rs_or_single_client() + self.addCleanup(client.close) + coll = client.db.test threads = [] for _ in range(4): threads.append(AutoAuthenticateThread(coll)) diff --git a/test/unified-test-format/valid-pass/observeSensitiveCommands.json b/test/unified-test-format/valid-pass/observeSensitiveCommands.json index 411ca19c5..d3ae5665b 100644 --- a/test/unified-test-format/valid-pass/observeSensitiveCommands.json +++ b/test/unified-test-format/valid-pass/observeSensitiveCommands.json @@ -61,6 +61,11 @@ "tests": [ { "description": "getnonce is observed with observeSensitiveCommands=true", + "runOnRequirements": [ + { + "maxServerVersion": "6.1.99" + } + ], "operations": [ { "name": "runCommand", @@ -106,6 +111,11 @@ }, { "description": "getnonce is not observed with observeSensitiveCommands=false", + "runOnRequirements": [ + { + "maxServerVersion": "6.1.99" + } + ], "operations": [ { "name": "runCommand", @@ -127,6 +137,11 @@ }, { "description": "getnonce is not observed by default", + "runOnRequirements": [ + { + "maxServerVersion": "6.1.99" + } + ], "operations": [ { "name": "runCommand",