gem 'factory_girl_rails'
gem 'database_cleaner'
gem 'ruby-prof'
- gem 'test-unit', require: false
- gem 'test-unit-activesupport', require: false
# Note: "require: false" here tells bunder not to automatically
# 'require' the packages during application startup. Installation is
# still mandatory.
+ gem 'test-unit', '~> 3.0', require: false
+ gem 'minitest-rails', require: false
+ gem 'minitest', '~> 4.0', require: false
gem 'simplecov', '~> 0.7.1', require: false
gem 'simplecov-rcov', require: false
gem 'mocha', require: false
memoist (0.15.0)
metaclass (0.0.4)
mime-types (1.25.1)
+ minitest (4.7.5)
+ minitest-rails (1.0.1)
+ minitest (~> 4.7)
+ minitest-test (~> 1.0)
+ railties (>= 3.0, < 4.1)
+ minitest-test (1.1.0)
+ minitest (~> 4.0)
mocha (1.2.0)
metaclass (~> 0.0.1)
multi_json (1.12.1)
sshkey (1.8.0)
test-unit (3.2.1)
power_assert
- test-unit-activesupport (1.0.6)
- activesupport
- test-unit
test_after_commit (1.1.0)
activerecord (>= 3.2)
themes_for_rails (0.5.1)
jquery-rails
lograge
logstash-event
+ minitest (~> 4.0)
+ minitest-rails
mocha
multi_json
oj
simplecov (~> 0.7.1)
simplecov-rcov
sshkey
- test-unit
- test-unit-activesupport
+ test-unit (~> 3.0)
test_after_commit
themes_for_rails
therubyracer
[2**8, :success],
[2**18, 422],
].each do |description_size, expected_response|
- test "create collection with description size #{description_size}
+ # Descriptions are not part of search indexes. Skip until
+ # full-text search is implemented, at which point replace with a
+ # search in description.
+ skip "create collection with description size #{description_size}
and expect response #{expected_response}" do
-
- omit "(Descriptions are not part of search indexes. Skip until
- full-text search is implemented, at which point replace with a
- search in description.)"
-
authorize_with :active
description = 'here is a collection with a very large description'
assert_response 404
end
- test "retrieve all permissions using generic links index api" do
- omit "(not implemented)"
+ # not implemented
+ skip "retrieve all permissions using generic links index api" do
# Links.readable_by() does not return the full set of permission
# links that are visible to a user (i.e., all permission links
# whose head_uuid references an object for which the user has
class CollectionsApiPerformanceTest < ActionDispatch::IntegrationTest
include ManifestExamples
- test "crud cycle for a collection with a big manifest" do
- slow_test
+ slow_test "crud cycle for a collection with a big manifest" do
bigmanifest = time_block 'make example' do
make_manifest(streams: 100,
files_per_stream: 100,
end
end
- test "memory usage" do
- slow_test
+ slow_test "memory usage" do
hugemanifest = make_manifest(streams: 1,
files_per_stream: 2000,
blocks_per_file: 200,
class DatabaseResetTest < ActionDispatch::IntegrationTest
self.use_transactional_fixtures = false
- test "reset fails when Rails.env != 'test'" do
- slow_test
+ slow_test "reset fails when Rails.env != 'test'" do
rails_env_was = Rails.env
begin
Rails.env = 'production'
assert_response 403
end
- test "database reset doesn't break basic CRUD operations" do
- slow_test
+ slow_test "database reset doesn't break basic CRUD operations" do
active_auth = auth(:active)
admin_auth = auth(:admin)
assert_response 404
end
- test "roll back database change" do
- slow_test
+ slow_test "roll back database change" do
active_auth = auth(:active)
admin_auth = auth(:admin)
assert_equal expect_next_logs[1].object_uuid, l2
end
- test "connect, subscribe, get event, unsubscribe" do
- slow_test
+ slow_test "connect, subscribe, get event, unsubscribe" do
state = 1
spec = nil
spec_ev_uuid = nil
assert_equal spec.uuid, spec_ev_uuid
end
- test "connect, subscribe, get event, unsubscribe with filter" do
- slow_test
+ slow_test "connect, subscribe, get event, unsubscribe with filter" do
state = 1
spec = nil
spec_ev_uuid = nil
end
- test "connect, subscribe, get event, try to unsubscribe with bogus filter" do
- slow_test
+ slow_test "connect, subscribe, get event, try to unsubscribe with bogus filter" do
state = 1
spec = nil
spec_ev_uuid = nil
assert_equal human.uuid, human_ev_uuid
end
-
-
- test "connected, not subscribed, no event" do
- slow_test
+ slow_test "connected, not subscribed, no event" do
authorize_with :active
ws_helper(token: :active, timeout: false) do |ws|
end
end
- test "connected, not authorized to see event" do
- slow_test
+ slow_test "connected, not authorized to see event" do
state = 1
authorize_with :admin
end
- test "connect, subscribe, lots of events" do
- slow_test
+ slow_test "connect, subscribe, lots of events" do
state = 1
event_count = 0
log_start = Log.order(:id).last.id
end
require File.expand_path('../../config/environment', __FILE__)
-require 'test/unit/active_support'
+gem 'minitest'
require 'rails/test_help'
-require 'mocha/test_unit'
+require 'minitest-rails'
+require 'minitest/autorun'
+require 'mocha'
module ArvadosTestSupport
def json_response
"HTTP_AUTHORIZATION" => "OAuth2 #{t}")
end
- def slow_test
- omit "RAILS_TEST_SHORT is set" if self.class.skip_slow_tests?
- end
-
def self.skip_slow_tests?
!(ENV['RAILS_TEST_SHORT'] || '').empty?
end
+
+ def self.skip(*args, &block)
+ end
+
+ def self.slow_test(name, &block)
+ define_method(name, block) unless skip_slow_tests?
+ end
+
+ alias_method :skip, :omit
end
class ActionController::TestCase
end
# "crrud" == "create read render update delete", not a typo
- test "crrud cycle for a collection with a big manifest)" do
- slow_test
+ slow_test "crrud cycle for a collection with a big manifest)" do
bigmanifest = time_block 'make example' do
make_manifest(streams: 100,
files_per_stream: 100,
assert test_perm.destroy, "could not delete new permission on target object"
end
- test "can_manage permission on a non-group object" do
- omit "bug #3091"
+ # bug #3091
+ skip "can_manage permission on a non-group object" do
set_user_from_auth :admin
ob = Specimen.create!