Browse Source

Added twilio test jobs.

Martin Edenhofer 6 years ago
parent
commit
7972ec9b6c
3 changed files with 13 additions and 2 deletions
  1. 12 0
      .gitlab-ci.yml
  2. 1 0
      app/models/scheduler.rb
  3. 0 2
      test/integration/twilio_sms_controller_test.rb

+ 12 - 0
.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

+ 1 - 0
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?

+ 0 - 2
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: {})