Sha256: 96cc4d20c381dcc76b40bf8f59a206a02a72060f49a0ba9577d4a92d3c48bfa2
Contents?: true
Size: 1.07 KB
Versions: 68
Compression:
Stored size: 1.07 KB
Contents
require 'test_helper' require_relative './support/dummy_active_job' require_relative './support/dummy_dynflow_action' require_relative './support/dummy_recurring_dynflow_action' require_relative './support/dummy_proxy_action' require_relative './support/dummy_task_group' require_relative './support/history_tasks_builder' require 'dynflow/testing' require 'foreman_tasks/test_helpers' FactoryBot.definition_file_paths = ["#{ForemanTasks::Engine.root}/test/factories"] FactoryBot.find_definitions ForemanTasks.dynflow.require! ForemanTasks.dynflow.config.disable_active_record_actions = true ForemanTasks::TestHelpers.use_in_memory_sqlite! # waits for the passed block to return non-nil value and reiterates it while getting false # (till some reasonable timeout). Useful for forcing the tests for some event to occur def wait_for(waiting_message = 'something to happen') 30.times do ret = yield return ret if ret sleep 0.3 end raise "waiting for #{waiting_message} was not successful" end def on_postgresql? ActiveRecord::Base.connection.adapter_name == 'PostgreSQL' end
Version data entries
68 entries across 68 versions & 1 rubygems