2
0
Fork 0
mirror of https://github.com/inspec/inspec synced 2024-12-21 10:33:23 +00:00
inspec/lib/verify/dummy.rb

52 lines
881 B
Ruby
Raw Normal View History

2015-09-03 18:36:46 +00:00
# encoding: utf-8
# Copyright 2014 Dominik Richter. All rights reserved.
# Spec file for Vulcano specs
# Get types
module DummyTestTypes
# a few commands with special handling
def describe *args; end
def context *args; end
def os
{}
end
2015-09-03 18:43:58 +00:00
def command(sth)
res = OpenStruct.new
2015-09-03 21:18:28 +00:00
res.stdout = ''
res.stderr = ''
res
end
end
module DummyVulcanoTypes
2015-09-05 14:07:54 +00:00
%w{
attributes registry_key
2015-09-05 14:07:54 +00:00
}.each do |name|
define_method name do |*arg|
end
end
def processes *args; [] end
def start_postgres_session *args; Describer.new end
def start_mysql_session *args; Describer.new end
class Describer
2015-09-03 18:43:58 +00:00
def describe(*args)
end
end
end
class SshConf
def initialize *args; end
end
class PostgresConf
def initialize *args; end
def params *a, &b; {} end
end
class MysqlConf
def initialize *args; end
def params *a, &b; {} end
end