2015-09-03 18:36:46 +00:00
|
|
|
# encoding: utf-8
|
2015-06-07 19:41:54 +00:00
|
|
|
# Copyright 2014 Dominik Richter. All rights reserved.
|
|
|
|
# Spec file for Vulcano specs
|
|
|
|
|
|
|
|
# Get types
|
2015-08-30 00:36:02 +00:00
|
|
|
module DummyTestTypes
|
2015-06-07 19:41:54 +00:00
|
|
|
# a few commands with special handling
|
2015-09-25 12:40:52 +00:00
|
|
|
def describe(*_args); end
|
|
|
|
|
|
|
|
def context(*_args); end
|
2015-06-07 19:41:54 +00:00
|
|
|
|
|
|
|
def os
|
|
|
|
{}
|
|
|
|
end
|
|
|
|
|
2015-09-25 12:40:52 +00:00
|
|
|
def command(_sth)
|
2015-06-07 19:41:54 +00:00
|
|
|
res = OpenStruct.new
|
2015-09-03 21:18:28 +00:00
|
|
|
res.stdout = ''
|
|
|
|
res.stderr = ''
|
2015-06-07 19:41:54 +00:00
|
|
|
res
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
module DummyVulcanoTypes
|
2015-09-05 14:07:54 +00:00
|
|
|
%w{
|
2015-06-07 19:41:54 +00:00
|
|
|
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|
|
2015-06-07 19:41:54 +00:00
|
|
|
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
|
2015-06-07 19:41:54 +00:00
|
|
|
|
|
|
|
class Describer
|
2015-09-25 12:40:52 +00:00
|
|
|
def describe(*_args); end
|
2015-06-07 19:41:54 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class SshConf
|
2015-09-25 12:40:52 +00:00
|
|
|
def initialize(*_args); end
|
2015-06-07 19:41:54 +00:00
|
|
|
end
|
|
|
|
class PostgresConf
|
2015-09-25 12:40:52 +00:00
|
|
|
def initialize(*_args); end
|
|
|
|
|
|
|
|
def params(*_a, &_b)
|
|
|
|
{}
|
|
|
|
end
|
2015-06-07 19:41:54 +00:00
|
|
|
end
|
2015-09-25 12:40:52 +00:00
|
|
|
|
2015-06-07 19:41:54 +00:00
|
|
|
class MysqlConf
|
2015-09-25 12:40:52 +00:00
|
|
|
def initialize(*_args); end
|
|
|
|
|
|
|
|
def params(*_a, &_b)
|
|
|
|
{}
|
|
|
|
end
|
2015-08-12 19:03:41 +00:00
|
|
|
end
|