Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST ONLY] APIv4 - ensure test records are cleaned up in non-transaction tests #23441

Merged
merged 1 commit into from
May 12, 2022

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented May 11, 2022

Overview

Cleans up APIv4 unit tests to make sure created records are cleaned up after the test finishes.

Technical Details

  • Use the new createTestRecord and saveTestRecords in non-transaction test classes so the created records are automatically cleaned-up.
  • Removes use TransactionalInterface from classes that don't need it (because they don't create any records).

@civibot
Copy link

civibot bot commented May 11, 2022

(Standard links)

@eileenmcnaughton
Copy link
Contributor

Test Result (1 failure / +1)api\v4\Spec\SpecGathererTest.testBasicFieldsGathering

Test Result (1 failure / +1)
api\v4\Spec\SpecGathererTest.testBasicFieldsGathering

…nsaction tests

Use the new `createTestRecord` and `saveTestRecords` in non-transaction test classes
so the created records are automatically cleaned-up.
@eileenmcnaughton eileenmcnaughton merged commit 868bdc2 into civicrm:master May 12, 2022
@eileenmcnaughton eileenmcnaughton deleted the api4TestCleanup branch May 12, 2022 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants