Merge pull request #27 from chef/profileid

improvement: simplify runner configuration
This commit is contained in:
Christoph Hartmann 2015-09-20 09:56:48 +02:00 committed by Dominik Richter
commit 7fd9f1ea1c
3 changed files with 4 additions and 4 deletions

View file

@ -71,7 +71,7 @@ class VulcanoCLI < Thor
desc: 'Configure WinRM scans to run via SSL instead of pure HTTP.'
option :format, type: :string, default: 'progress'
def exec(*tests)
runner = Vulcano::Runner.new(options[:id], options)
runner = Vulcano::Runner.new(options)
runner.add_tests(tests)
runner.run
rescue RuntimeError => e

View file

@ -14,9 +14,9 @@ require 'vulcano/rspec_json_formatter'
module Vulcano
class Runner
attr_reader :tests
def initialize(profile_id, conf)
def initialize(conf = {})
@rules = []
@profile_id = profile_id
@profile_id = @conf[:id]
@conf = Vulcano::Backend.target_config(normalize_map(conf))
@tests = RSpec::Core::World.new

View file

@ -77,7 +77,7 @@ class DockerTester
def test_container(container, report)
puts "--> run test on docker #{container.id}"
opts = { 'target' => "docker://#{container.id}" }
runner = Vulcano::Runner.new(nil, opts)
runner = Vulcano::Runner.new(opts)
runner.add_tests(@tests)
tests = runner.tests.ordered_example_groups
tests.map { |g| g.run(report) }