module Cadence::Testing::WorkflowOverride

Public Instance Methods

allow_all_releases() click to toggle source
# File lib/cadence/testing/workflow_override.rb, line 12
def allow_all_releases
  disabled_releases.clear
end
allow_release(release_name) click to toggle source
# File lib/cadence/testing/workflow_override.rb, line 16
def allow_release(release_name)
  disabled_releases.delete(release_name.to_s)
end
disable_release(release_name) click to toggle source
# File lib/cadence/testing/workflow_override.rb, line 20
def disable_release(release_name)
  disabled_releases << release_name.to_s
end
disabled_releases() click to toggle source
# File lib/cadence/testing/workflow_override.rb, line 8
def disabled_releases
  @disabled_releases ||= Set.new
end
execute_locally(*input) click to toggle source
# File lib/cadence/testing/workflow_override.rb, line 24
def execute_locally(*input)
  workflow_id = SecureRandom.uuid
  run_id = SecureRandom.uuid
  execution = WorkflowExecution.new
  context = Cadence::Testing::LocalWorkflowContext.new(
    execution, workflow_id, run_id, disabled_releases
  )

  execute_in_context(context, input)
end