inspec/test/runner/test_ssh.rb

26 lines
482 B
Ruby
Raw Normal View History

# encoding: utf-8
require_relative 'helper'
require 'vulcano/backend'
backends = {}
2015-10-05 21:46:33 +00:00
backend_conf = {
'target' => 'ssh://vagrant@localhost',
'key_file' => '/root/.ssh/id_rsa',
2015-10-05 21:46:33 +00:00
}
backends[:specinfra_ssh] = proc {
2015-10-05 21:46:33 +00:00
Vulcano::Backend.create('specinfra', backend_conf).backend
}
backends[:ssh] = proc {
2015-10-05 21:46:33 +00:00
Vulcano::Backend.create('ssh', backend_conf).backend
}
tests = ARGV
backends.each do |type, get_backend|
tests.each do |test|
instance_eval(File.read(test))
end
end