inspec/test/runner/test_ssh.rb

30 lines
601 B
Ruby
Raw Normal View History

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