9017: Skip some slow API server tests in --short mode.
[arvados.git] / services / api / test / test_helper.rb
index 197ae24547a217f29c1a5c3308ccd0b53e8fde85..25ab286a23099f4125aaf1cce65a24450804e051 100644 (file)
@@ -26,7 +26,7 @@ require 'mocha/mini_test'
 
 module ArvadosTestSupport
   def json_response
-    Oj.load response.body
+    Oj.strict_load response.body
   end
 
   def api_token(api_client_auth_name)
@@ -106,6 +106,10 @@ class ActiveSupport::TestCase
     ArvadosApiToken.new.call("rack.input" => "",
                              "HTTP_AUTHORIZATION" => "OAuth2 #{t}")
   end
+
+  def slow_test
+    skip "RAILS_TEST_SHORT is set" unless (ENV['RAILS_TEST_SHORT'] || '').empty?
+  end
 end
 
 class ActionController::TestCase