mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
Also: * Refactored the specs organization to make the resoning behind simplier, introducing the idea of an artifact subject that it wraps the interactions with the platform. * Add methods to destroy, bootstrap and halt a list of machines either all of them or the ones listed under a given platform name. * Introduced more clear namespacing in the rakefile. * Updated the list of available platforms for acceptance testing, including latest ubuntu, oel, fedora, debian and suse versions Fixes #5350
23 lines
703 B
Ruby
23 lines
703 B
Ruby
# encoding: utf-8
|
|
require "json"
|
|
|
|
module SpecsHelper
|
|
|
|
def self.configure(vagrant_boxes)
|
|
setup_config = JSON.parse(File.read(File.join(File.dirname(__FILE__), "..", "..", ".vm_ssh_config")))
|
|
boxes = vagrant_boxes.inject({}) do |acc, v|
|
|
acc[v.name] = v.type
|
|
acc
|
|
end
|
|
ServiceTester.configure do |config|
|
|
config.servers = []
|
|
config.lookup = {}
|
|
setup_config.each do |host_info|
|
|
next unless boxes.keys.include?(host_info["host"])
|
|
url = "#{host_info["hostname"]}:#{host_info["port"]}"
|
|
config.servers << url
|
|
config.lookup[url] = {"host" => host_info["host"], "type" => boxes[host_info["host"]] }
|
|
end
|
|
end
|
|
end
|
|
end
|