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

Internal: Allow debugging mail spool for failed tests #3489

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

Kingdutch
Copy link
Member

Problem / Solution

It can be difficult to debug failed tests for e-mails because we are not able to look at the files that are in the mail-spool. This commit changes the Behat failure scenario to also copy any e-mail messages from the mail-spool on a test failure.

Issue tracker

Internal change no ticket

How to test

  • Fail a behat email test in the CI and see its output in the attachment

Definition of done

Before merge

  • Code/peer review is completed
  • All commit messages are clear and clean. If applicable a rebase was performed
  • All automated tests are green
  • Functional/manual tests of the acceptance criteria are approved
  • All acceptance criteria were met
  • New features or changes to existing features are covered by tests, either unit (preferably) or behat
  • Update path is tested. New hook_updates should respect update order, right naming convention and consider hook_post_update code
  • Module can be safely uninstalled. Update/implement hook_uninstall and make sure that removed configuration or dependencies are removed/uninstalled
  • This pull request has all required labels (team/type/priority)
  • This pull request has a milestone
  • This pull request has an assignee (if applicable)
  • Any front end changes are tested on all major browsers
  • New UI elements, or changes on UI elements are approved by the design team
  • New features, or feature changes are approved by the product owner

After merge

  • Code is tested on all branches that it has been cherry-picked
  • Update hook number might need adjustment, make sure they have the correct order
  • The Drupal.org ticket(s) are updated according to this pull request status

It can be difficult to debug failed tests for e-mails because we are not
able to look at the files that are in the mail-spool. This commit
changes the Behat failure scenario to also copy any e-mail messages from
the mail-spool on a test failure.
@Kingdutch Kingdutch added team: bananas status: needs review This pull request is waiting for a requested review prio: low type: repository Improvements to working with the repository (e.g. templates, README files, or workflows) labels Aug 23, 2023
@mergeable
Copy link

mergeable bot commented Aug 23, 2023

Thanks for contributing towards Open Social! A maintainer from the @goalgorilla/maintainers group might not review all changes from all teams/contributors. Please don't be discouraged if it takes a while. In the meantime, we have some automated checks running and it might be that you will see our comments with some tips or requests to speed up the review process. 😊

@robertragas
Copy link
Contributor

Approved, tested it in the replace swiftmailer story where the tests where failing and wasn't sure why. This changed helped me to see the emails that were sent and pinpoint the issue itself.

@robertragas robertragas merged commit c112779 into main Aug 23, 2023
191 checks passed
@robertragas robertragas deleted the internal/behat-mail-spool-debug branch August 23, 2023 13:53
@robertragas robertragas added status: no action needed and removed status: needs review This pull request is waiting for a requested review labels Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio: low type: repository Improvements to working with the repository (e.g. templates, README files, or workflows)
Development

Successfully merging this pull request may close these issues.

2 participants