inspec/lib/verify/dummy.rb

70 lines
990 B
Ruby
Raw Normal View History

2015-09-03 18:36:46 +00:00
# encoding: utf-8
# Copyright 2014 Dominik Richter. All rights reserved.
2015-10-06 16:55:44 +00:00
# author: Dominik Richter
# author: Christoph Hartmann
# Spec file for Vulcano specs
# Get types
module DummyTestTypes
# a few commands with special handling
2015-09-25 12:40:52 +00:00
def describe(*_args); end
def context(*_args); end
def os
{}
end
2015-09-25 12:40:52 +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|
2015-09-25 12:40:52 +00:00
define_method name do |*_arg|
end
end
2015-09-25 12:40:52 +00:00
def processes(*_args)
[]
end
def start_postgres_session(*_args)
Describer.new
end
def start_mysql_session(*_args)
Describer.new
end
class Describer
2015-09-25 12:40:52 +00:00
def describe(*_args); end
end
end
class SshConf
2015-09-25 12:40:52 +00:00
def initialize(*_args); end
end
class PostgresConf
2015-09-25 12:40:52 +00:00
def initialize(*_args); end
def params(*_a, &_b)
{}
end
end
2015-09-25 12:40:52 +00:00
class MysqlConf
2015-09-25 12:40:52 +00:00
def initialize(*_args); end
def params(*_a, &_b)
{}
end
end