Skip to content

Commit 35ea201

Browse files
committed
debug again
1 parent 6276d78 commit 35ea201

File tree

6 files changed

+1
-33
lines changed

6 files changed

+1
-33
lines changed

.evergreen/config.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -880,10 +880,6 @@ task_groups:
880880
binary: bash
881881
args:
882882
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/teardown.sh
883-
- command: shell.exec
884-
params:
885-
shell: bash
886-
script: cat src/temp.txt
887883
setup_group_can_fail_task: true
888884
setup_group_timeout_secs: 1800
889885
tasks:

.evergreen/run-mongodb-oidc-test.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,4 @@ fi
3232
export TEST_AUTH_OIDC=1
3333
export COVERAGE=1
3434
export AUTH="auth"
35-
bash ./.evergreen/hatch.sh test:test-eg -- "${@:1}" || {
36-
echo "Test failed!"
37-
cat temp.txt
38-
exit 1
39-
}
35+
bash ./.evergreen/hatch.sh test:test-eg -- "${@:1}"

pymongo/asynchronous/auth_oidc.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ class _OIDCAuthenticator:
8787
async def reauthenticate(self, conn: AsyncConnection) -> Optional[Mapping[str, Any]]:
8888
"""Handle a reauthenticate from the server."""
8989
# Invalidate the token for the connection.
90-
with open("temp.txt", "a") as fid: # noqa: ASYNC101
91-
fid.write("reauthenticating\n")
9290
self._invalidate(conn)
9391
# Call the appropriate auth logic for the callback type.
9492
if self.properties.callback:
@@ -99,19 +97,12 @@ async def authenticate(self, conn: AsyncConnection) -> Optional[Mapping[str, Any
9997
"""Handle an initial authenticate request."""
10098
# First handle speculative auth.
10199
# If it succeeded, we are done.
102-
with open("temp.txt", "a") as fid: # noqa: ASYNC101
103-
fid.write("authenticating\n")
104100
ctx = conn.auth_ctx
105101
if ctx and ctx.speculate_succeeded():
106-
with open("temp.txt", "a") as fid: # noqa: ASYNC101
107-
fid.write("speculative auth succeeded\n")
108102
resp = ctx.speculative_authenticate
109103
if resp and resp["done"]:
110104
conn.oidc_token_gen_id = self.token_gen_id
111105
return resp
112-
else:
113-
with open("temp.txt", "a") as fid: # noqa: ASYNC101
114-
fid.write("speculative auth failed\n")
115106

116107
# If spec auth failed, call the appropriate auth logic for the callback type.
117108
# We cannot assume that the token is invalid, because a proxy may have been

pymongo/synchronous/auth_oidc.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ class _OIDCAuthenticator:
8787
def reauthenticate(self, conn: Connection) -> Optional[Mapping[str, Any]]:
8888
"""Handle a reauthenticate from the server."""
8989
# Invalidate the token for the connection.
90-
with open("temp.txt", "a") as fid: # noqa: ASYNC101
91-
fid.write("reauthenticating\n")
9290
self._invalidate(conn)
9391
# Call the appropriate auth logic for the callback type.
9492
if self.properties.callback:
@@ -99,19 +97,12 @@ def authenticate(self, conn: Connection) -> Optional[Mapping[str, Any]]:
9997
"""Handle an initial authenticate request."""
10098
# First handle speculative auth.
10199
# If it succeeded, we are done.
102-
with open("temp.txt", "a") as fid: # noqa: ASYNC101
103-
fid.write("authenticating\n")
104100
ctx = conn.auth_ctx
105101
if ctx and ctx.speculate_succeeded():
106-
with open("temp.txt", "a") as fid: # noqa: ASYNC101
107-
fid.write("speculative auth succeeded\n")
108102
resp = ctx.speculative_authenticate
109103
if resp and resp["done"]:
110104
conn.oidc_token_gen_id = self.token_gen_id
111105
return resp
112-
else:
113-
with open("temp.txt", "a") as fid: # noqa: ASYNC101
114-
fid.write("speculative auth failed\n")
115106

116107
# If spec auth failed, call the appropriate auth logic for the callback type.
117108
# We cannot assume that the token is invalid, because a proxy may have been

test/auth_oidc/test_auth_oidc.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -753,13 +753,9 @@ class TestAuthOIDCMachine(OIDCTestBase):
753753

754754
def setUp(self):
755755
self.request_called = 0
756-
with open("temp.txt", "a") as fid: # noqa: ASYNC101
757-
fid.write(f"****\n{self.id()}\n")
758756

759757
def create_request_cb(self, username=None, sleep=0):
760758
def request_token(context):
761-
with open("temp.txt", "a") as fid: # noqa: ASYNC101
762-
fid.write("got a request\n")
763759
assert isinstance(context.timeout_seconds, int)
764760
assert context.version == 1
765761
assert context.refresh_token is None

test/unified_format.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,6 @@ def setUp(self):
536536

537537
def maybe_skip_test(self, spec):
538538
# add any special-casing for skipping tests here
539-
with open("temp.txt", "a") as fid:
540-
fid.write(f"****\n{spec['description']}\n")
541539
if client_context.storage_engine == "mmapv1":
542540
if (
543541
"Dirty explicit session is discarded" in spec["description"]

0 commit comments

Comments
 (0)