Maintenance: Use dedicated docker mail server for email integration tests to prevent race condition between different CI jobs.

This commit is contained in:
Thorsten Eckel 2020-11-17 09:31:24 +01:00
parent 81d804576b
commit 0a85b079ca
3 changed files with 14 additions and 1 deletions

View file

@ -33,6 +33,12 @@ variables:
MAILBOX_INIT: "zammad@mail.test.dc.zammad.com:zammad"
MAIL_ADDRESS: "zammad@mail.test.dc.zammad.com"
MAIL_PASS: "zammad"
# docker-imap-devel variables required for integration tests
MAIL_SERVER: "mail"
MAIL_SERVER_ACCOUNT: "zammad@mail.test.dc.zammad.com:zammad"
MAIL_SERVER_EMAIL: "zammad@mail.test.dc.zammad.com"
KEEP_ON_MAIL_SERVER: "mail"
KEEP_ON_MAIL_SERVER_ACCOUNT: "zammad@mail.test.dc.zammad.com:zammad"
# Cache gems in between jobs and pipelines
# ATTENTION: We use a combination of the Ruby major and minor version number

View file

@ -86,6 +86,12 @@
- <<: *docker_postgresql
- <<: *docker_selenium
.services_mysql_postgresql_imap: &services_mysql_postgresql_imap
services:
- <<: *docker_mysql
- <<: *docker_postgresql
- <<: *docker_imap
.services_mysql_postgresql_elasticsearch: &services_mysql_postgresql_elasticsearch
variables:
ELASTICSEARCH_TAG: 'stable'

View file

@ -2,9 +2,10 @@ email_helper_deliver:
extends:
- .template_integration
- .tags_mail
- .services_mysql_postgresql_imap
script:
- bundle exec rake zammad:db:unseeded
- bundle exec rails test test/integration/email_helper_test.rb
- bundle exec rails test test/integration/email_deliver_test.rb
- bundle exec rails test test/integration/email_keep_on_server_test.rb
- bundle exec rails test test/integration/email_postmaster_to_sender.rb
- bundle exec rails test test/integration/email_postmaster_to_sender.rb