Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Speed up tests by lowering BCrypt's cost function

Christophe Bliard0aa1a7935f4f
diff --git a/config/environments/test.rb b/config/environments/test.rb
index ce2c7bc0a0d..695846896a3 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -89,4 +89,7 @@ OpenProject::Application.configure do
assets_cache_path = Rails.root.join("tmp/cache/assets/paralleltests#{ENV['TEST_ENV_NUMBER']}")
config.assets.cache = Sprockets::Cache::FileStore.new(assets_cache_path)
end
+
+ # Speed up tests by lowering BCrypt's cost function
+ BCrypt::Engine.cost = BCrypt::Engine::MIN_COST
end