mirror of
https://github.com/inspec/inspec
synced 2024-11-23 21:23:29 +00:00
25 lines
540 B
Ruby
25 lines
540 B
Ruby
# encoding: utf-8
|
|
# author: Dominik Richter
|
|
|
|
require 'vulcano/backend'
|
|
require_relative 'helper'
|
|
|
|
container_id = ENV['CONTAINER'] or
|
|
fail 'You must provide a container ID via CONTAINER env'
|
|
|
|
tests = ARGV
|
|
puts ['Running tests:', tests].flatten.join("\n- ")
|
|
puts ''
|
|
|
|
backends = {}
|
|
backends[:docker] = proc {
|
|
c = { 'host' => container_id }
|
|
opt = Vulcano::Backend.target_config(c)
|
|
Vulcano::Backend.create('docker', opt).backend
|
|
}
|
|
|
|
backends.each do |type, get_backend|
|
|
tests.each do |test|
|
|
instance_eval(File.read(test))
|
|
end
|
|
end
|