Browse Source

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

Thorsten Eckel 4 years ago
parent
commit
0a85b079ca
3 changed files with 14 additions and 1 deletions
  1. 6 0
      .gitlab-ci.yml
  2. 6 0
      .gitlab/ci/base.yml
  3. 2 1
      .gitlab/ci/integration/email_helper_deliver.yml

+ 6 - 0
.gitlab-ci.yml

@@ -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

+ 6 - 0
.gitlab/ci/base.yml

@@ -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'

+ 2 - 1
.gitlab/ci/integration/email_helper_deliver.yml

@@ -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