Revision 9aadd812
Added by Daniel Lobato Garcia over 8 years ago
bundler.d/development.rb | ||
---|---|---|
|
||
gem 'pry'
|
||
gem 'bullet'
|
||
gem "parallel_tests"
|
||
end
|
config/environments/test.rb | ||
---|---|---|
|
||
#enables a few aliases - context, should, and should_eventually methods
|
||
config.minitest_spec_rails.mini_shoulda = true
|
||
|
||
# Use separate cache stores for parallel_tests
|
||
config.cache_store = :file_store, Rails.root.join("tmp", "cache", "paralleltests#{ENV['TEST_ENV_NUMBER']}")
|
||
end
|
test/fixtures/settings.yml | ||
---|---|---|
settings_type: integer
|
||
category: Setting::Puppet
|
||
default: 5
|
||
description: "Duration in minutes after the Puppet interval for servers to be classed as out of sync."
|
||
description: "Duration in minutes after the Puppet interval for servers to be classed as out of sync."
|
||
attributes56:
|
||
name: email_reply_address
|
||
category: Setting::General
|
||
default: "Foreman-noreply@#{SETTINGS[:domain]}"
|
||
description: 'Email reply address for emails that Foreman is sending'
|
test/functional/api/v2/users_controller_test.rb | ||
---|---|---|
require 'test_helper'
|
||
|
||
class Api::V2::UsersControllerTest < ActionController::TestCase
|
||
valid_attrs = { :login => "johnsmith",
|
||
:mail => 'john@example.com',
|
||
:auth_source_id => AuthSourceInternal.first.id,
|
||
:password => '123456' }
|
||
def valid_attrs
|
||
{ :login => "johnsmith", :mail => 'john@example.com',
|
||
:auth_source_id => auth_sources(:internal), :password => '123456' }
|
||
end
|
||
|
||
def setup
|
||
setup_users
|
test/integration/environment_test.rb | ||
---|---|---|
assert_submit_button(environments_path)
|
||
assert page.has_link? 'production222'
|
||
end
|
||
end
|
||
end
|
test/integration/host_test.rb | ||
---|---|---|
require 'test_helper'
|
||
|
||
class HostTest < ActionDispatch::IntegrationTest
|
||
class HostIntegrationTest < ActionDispatch::IntegrationTest
|
||
def setup
|
||
Capybara.current_driver = Capybara.javascript_driver
|
||
login_admin
|
Also available in: Unified diff
Fixes #10106 - Make tests run in parallel
Run rake parallel:test to run tests in several processes. The gem will
auto split the tests in as many cores as you have available.
Keep in mind running tests in parallel could highlight race conditions
we would've missed otherwise, so some tests might to be fixed to ensure
any process can pick it up and run it.