2015-09-24 18:51:56 +00:00
|
|
|
# encoding: utf-8
|
|
|
|
require_relative 'helper'
|
|
|
|
require 'vulcano/backend'
|
|
|
|
|
|
|
|
backends = {}
|
2015-09-25 12:09:41 +00:00
|
|
|
backend_conf = Vulcano::Backend.target_config({
|
|
|
|
'target' => 'ssh://vagrant@localhost',
|
|
|
|
'key_file' => '/root/.ssh/id_rsa',
|
|
|
|
})
|
2015-09-24 18:51:56 +00:00
|
|
|
|
|
|
|
backends[:specinfra_ssh] = proc {
|
|
|
|
backend_class = Vulcano::Backend.registry['specinfra']
|
|
|
|
backend_class.new(backend_conf)
|
|
|
|
}
|
|
|
|
|
2015-09-25 12:09:41 +00:00
|
|
|
backends[:ssh] = proc {
|
|
|
|
backend_class = Vulcano::Backend.registry['ssh']
|
|
|
|
backend_class.new(backend_conf)
|
|
|
|
}
|
|
|
|
|
2015-09-24 18:51:56 +00:00
|
|
|
tests = ARGV
|
|
|
|
|
|
|
|
backends.each do |type, get_backend|
|
|
|
|
tests.each do |test|
|
|
|
|
instance_eval(File.read(test))
|
|
|
|
end
|
|
|
|
end
|