Sha256: 84f9aa609a41eec4a40ca1a68769e9e628a0042bb37a5f78c4c94b81dcc90eb9

Contents?: true

Size: 1.03 KB

Versions: 108

Compression:

Stored size: 1.03 KB

Contents

#!/usr/bin/env ruby

# Runner for non-parallel execution of a single scenario.
# It prints all the info stdout, etc and basically replaces itself with the scenario execution.
# It is useful when we work with a single spec and we need all the debug info

raise 'This code needs to be executed WITHOUT bundle exec' if Kernel.const_defined?(:Bundler)

require 'open3'
require 'fileutils'
require 'pathname'
require 'tmpdir'
require 'etc'

ROOT_PATH = Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), '../')))

# Load all the specs
specs = Dir[ROOT_PATH.join('spec/integrations/**/*.rb')]

# If filters is provided, apply
# Allows to provide several filters one after another and applies all of them
ARGV.each do |filter|
  specs.delete_if { |name| !name.include?(filter) }
end

raise ArgumentError, "No integration specs with filters: #{ARGV.join(', ')}" if specs.empty?
raise ArgumentError, "Many specs found with filters: #{ARGV.join(', ')}" if specs.size != 1

exec("bundle exec ruby -r #{ROOT_PATH}/spec/integrations_helper.rb #{specs[0]}")

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
karafka-2.4.17 bin/scenario
karafka-2.4.16 bin/scenario
karafka-2.4.15 bin/scenario
karafka-2.4.14 bin/scenario
karafka-2.4.13 bin/scenario
karafka-2.4.12 bin/scenario
karafka-2.4.11 bin/scenario
karafka-2.4.10 bin/scenario
karafka-2.4.9 bin/scenario
karafka-2.4.8 bin/scenario
karafka-2.4.7 bin/scenario
karafka-2.4.6 bin/scenario
karafka-2.4.5 bin/scenario
karafka-2.4.4 bin/scenario
karafka-2.4.3 bin/scenario
karafka-2.4.0 bin/scenario
karafka-2.4.0.rc1 bin/scenario
karafka-2.3.4 bin/scenario
karafka-2.4.0.beta2 bin/scenario
karafka-2.4.0.beta1 bin/scenario