test: commit Files retirement transaction
This commit is contained in:
@@ -169,6 +169,10 @@ class ConnectorCredentialDeletionTests(unittest.TestCase):
|
||||
"govoplan_files.backend.storage.connector_credential_deletion.audit_event"
|
||||
) as audit:
|
||||
plan.destroy_data_executor(self.session, "files")
|
||||
# The retirement executor deliberately enlists secret scrubbing, audit
|
||||
# writes, and DDL in the caller-owned transaction. Commit that unit of
|
||||
# work before inspecting through a separate Engine connection.
|
||||
self.session.commit()
|
||||
|
||||
self.assertEqual(2, audit.call_count)
|
||||
self.assertEqual(
|
||||
@@ -193,6 +197,7 @@ class ConnectorCredentialDeletionTests(unittest.TestCase):
|
||||
"govoplan_files.backend.storage.connector_credential_deletion.audit_event"
|
||||
) as audit:
|
||||
plan.destroy_data_executor(self.session, "files")
|
||||
self.session.commit()
|
||||
|
||||
audit.assert_called_once()
|
||||
details = audit.call_args.kwargs["details"]
|
||||
|
||||
Reference in New Issue
Block a user