Skip to content

Commit 06eb1af

Browse files
committed
use auth marker
1 parent 69e2543 commit 06eb1af

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

.evergreen/run-tests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ if [ -n "$TEST_ENTERPRISE_AUTH" ]; then
9090
export GSSAPI_HOST=${SASL_HOST}
9191
export GSSAPI_PORT=${SASL_PORT}
9292
export GSSAPI_PRINCIPAL=${PRINCIPAL}
93+
94+
export TEST_SUITES="auth"
9395
fi
9496

9597
if [ -n "$TEST_LOADBALANCER" ]; then

test/asynchronous/test_auth.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
)
3333
from test.utils import AllowListEventListener, delay, ignore_deprecations
3434

35+
import pytest
36+
3537
from pymongo import AsyncMongoClient, monitoring
3638
from pymongo.asynchronous.auth import HAVE_KERBEROS
3739
from pymongo.auth_shared import _build_credentials_tuple
@@ -80,6 +82,7 @@ def run(self):
8082

8183

8284
class TestGSSAPI(AsyncPyMongoTestCase):
85+
pytestmark = pytest.mark.auth
8386
mech_properties: str
8487
service_realm_required: bool
8588

@@ -266,6 +269,8 @@ async def test_gssapi_threaded(self):
266269

267270

268271
class TestSASLPlain(AsyncPyMongoTestCase):
272+
pytestmark = pytest.mark.auth
273+
269274
@classmethod
270275
def setUpClass(cls):
271276
if not SASL_HOST or not SASL_USER or not SASL_PASS:
@@ -339,6 +344,8 @@ def auth_string(user, password):
339344

340345

341346
class TestSCRAMSHA1(AsyncIntegrationTest):
347+
pytestmark = pytest.mark.auth
348+
342349
@async_client_context.require_auth
343350
async def asyncSetUp(self):
344351
await super().asyncSetUp()
@@ -373,6 +380,8 @@ async def test_scram_sha1(self):
373380

374381
# https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst#scram-sha-256-and-mechanism-negotiation
375382
class TestSCRAM(AsyncIntegrationTest):
383+
pytestmark = pytest.mark.auth
384+
376385
@async_client_context.require_auth
377386
@async_client_context.require_version_min(3, 7, 2)
378387
async def asyncSetUp(self):
@@ -612,6 +621,8 @@ async def test_scram_threaded(self):
612621

613622

614623
class TestAuthURIOptions(AsyncIntegrationTest):
624+
pytestmark = pytest.mark.auth
625+
615626
@async_client_context.require_auth
616627
async def asyncSetUp(self):
617628
await super().asyncSetUp()

test/test_auth.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
)
3333
from test.utils import AllowListEventListener, delay, ignore_deprecations
3434

35+
import pytest
36+
3537
from pymongo import MongoClient, monitoring
3638
from pymongo.auth_shared import _build_credentials_tuple
3739
from pymongo.errors import OperationFailure
@@ -80,6 +82,7 @@ def run(self):
8082

8183

8284
class TestGSSAPI(PyMongoTestCase):
85+
pytestmark = pytest.mark.auth
8386
mech_properties: str
8487
service_realm_required: bool
8588

@@ -266,6 +269,8 @@ def test_gssapi_threaded(self):
266269

267270

268271
class TestSASLPlain(PyMongoTestCase):
272+
pytestmark = pytest.mark.auth
273+
269274
@classmethod
270275
def setUpClass(cls):
271276
if not SASL_HOST or not SASL_USER or not SASL_PASS:
@@ -339,6 +344,8 @@ def auth_string(user, password):
339344

340345

341346
class TestSCRAMSHA1(IntegrationTest):
347+
pytestmark = pytest.mark.auth
348+
342349
@client_context.require_auth
343350
def setUp(self):
344351
super().setUp()
@@ -371,6 +378,8 @@ def test_scram_sha1(self):
371378

372379
# https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst#scram-sha-256-and-mechanism-negotiation
373380
class TestSCRAM(IntegrationTest):
381+
pytestmark = pytest.mark.auth
382+
374383
@client_context.require_auth
375384
@client_context.require_version_min(3, 7, 2)
376385
def setUp(self):
@@ -608,6 +617,8 @@ def test_scram_threaded(self):
608617

609618

610619
class TestAuthURIOptions(IntegrationTest):
620+
pytestmark = pytest.mark.auth
621+
611622
@client_context.require_auth
612623
def setUp(self):
613624
super().setUp()

0 commit comments

Comments
 (0)