diff --git a/test/integration/email_deliver_test.rb b/test/integration/email_deliver_test.rb index 1adf43d80..5fd60e1f6 100644 --- a/test/integration/email_deliver_test.rb +++ b/test/integration/email_deliver_test.rb @@ -11,12 +11,16 @@ class EmailDeliverTest < ActiveSupport::TestCase raise "Need MAIL_SERVER_ACCOUNT as ENV variable like export MAIL_SERVER_ACCOUNT='user:somepass'" end + if ENV['MAIL_SERVER_EMAIL'].blank? + raise "Need MAIL_SERVER_EMAIL as ENV variable like export MAIL_SERVER_EMAIL='someunitest@example.com'" + end + server_login = ENV['MAIL_SERVER_ACCOUNT'].split(':')[0] server_password = ENV['MAIL_SERVER_ACCOUNT'].split(':')[1] email_address = EmailAddress.create!( realname: 'me Helpdesk', - email: "me#{rand(999_999_999)}@example.com", + email: "some-zammad-#{ENV['MAIL_SERVER_EMAIL']}", updated_by_id: 1, created_by_id: 1, ) diff --git a/test/integration/email_postmaster_to_sender.rb b/test/integration/email_postmaster_to_sender.rb index 14521c2cf..b51de4db9 100644 --- a/test/integration/email_postmaster_to_sender.rb +++ b/test/integration/email_postmaster_to_sender.rb @@ -30,7 +30,7 @@ class EmailPostmasterToSender < ActiveSupport::TestCase @email_address = EmailAddress.create!( realname: 'me Helpdesk', - email: "me#{@test_id}@example.com", + email: "some-zammad-#{ENV['MAIL_SERVER_EMAIL']}", updated_by_id: 1, created_by_id: 1, )