diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d50b9dc68..30346b337 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -232,6 +232,18 @@ test:integration:telegram: - ruby -I test test/integration/telegram_controller_test.rb - rake db:drop +test:integration:twilio: + <<: *artifacts_error + stage: test + variables: + RAILS_ENV: "test" + tags: + - core + script: + - rake zammad:db:init + - ruby -I test test/integration/twilio_sms_controller_test.rb + - rake db:drop + test:integration:idoit: <<: *artifacts_error stage: test diff --git a/app/models/scheduler.rb b/app/models/scheduler.rb index 5710d400d..7d091311a 100644 --- a/app/models/scheduler.rb +++ b/app/models/scheduler.rb @@ -335,6 +335,7 @@ class Scheduler < ApplicationModel loop do success, failure = Delayed::Worker.new.work_off if failure.nonzero? + p Delayed::Job.where('last_error IS NOT NULL').to_json # rubocop:disable Rails/Output raise "ERROR: #{failure} failed background jobs: #{Delayed::Job.where('last_error IS NOT NULL').inspect}" end break if success.zero? diff --git a/test/integration/twilio_sms_controller_test.rb b/test/integration/twilio_sms_controller_test.rb index 77ab2fdc7..153b8d2a5 100644 --- a/test/integration/twilio_sms_controller_test.rb +++ b/test/integration/twilio_sms_controller_test.rb @@ -167,10 +167,8 @@ class TwilioSmsControllerTest < ActionDispatch::IntegrationTest headers: { 'Accept' => 'application/json', 'Accept-Charset' => 'utf-8', - 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization' => 'Basic MTExOjIyMw==', 'Content-Type' => 'application/x-www-form-urlencoded', - 'User-Agent' => 'twilio-ruby/5.10.2 (ruby/x86_64-darwin16 2.4.4-p296)' } ).to_return(status: 200, body: '', headers: {})