Sha256: cf294c443e9add327ce0a675f27aeabd433618f4d91c6751242d36e78a5cd214

Contents?: true

Size: 1013 Bytes

Versions: 23

Compression:

Stored size: 1013 Bytes

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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
foreman-tasks-0.17.6 test/foreman_tasks_test_helper.rb
foreman-tasks-1.0.1 test/foreman_tasks_test_helper.rb
foreman-tasks-1.0.0 test/foreman_tasks_test_helper.rb
foreman-tasks-0.17.5 test/foreman_tasks_test_helper.rb
foreman-tasks-0.17.4 test/foreman_tasks_test_helper.rb
foreman-tasks-0.17.3 test/foreman_tasks_test_helper.rb
foreman-tasks-0.17.2 test/foreman_tasks_test_helper.rb
foreman-tasks-0.16.3 test/foreman_tasks_test_helper.rb
foreman-tasks-0.17.1 test/foreman_tasks_test_helper.rb
foreman-tasks-0.15.11 test/foreman_tasks_test_helper.rb
foreman-tasks-0.16.2 test/foreman_tasks_test_helper.rb
foreman-tasks-0.15.10 test/foreman_tasks_test_helper.rb
foreman-tasks-0.16.1 test/foreman_tasks_test_helper.rb
foreman-tasks-0.17.0 test/foreman_tasks_test_helper.rb
foreman-tasks-0.15.9 test/foreman_tasks_test_helper.rb
foreman-tasks-0.15.8 test/foreman_tasks_test_helper.rb
foreman-tasks-0.15.7 test/foreman_tasks_test_helper.rb
foreman-tasks-0.16.0 test/foreman_tasks_test_helper.rb
foreman-tasks-0.15.6 test/foreman_tasks_test_helper.rb
foreman-tasks-0.15.5 test/foreman_tasks_test_helper.rb