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
|
|
|
|
def describe *args; end
|
|
|
|
def context *args; end
|
|
|
|
|
|
|
|
def os
|
|
|
|
{}
|
|
|
|
end
|
|
|
|
|
2015-09-03 18:43:58 +00:00
|
|
|
def command(sth)
|
2015-06-07 19:41:54 +00:00
|
|
|
res = OpenStruct.new
|
|
|
|
res.stdout = ""
|
|
|
|
res.stderr = ""
|
|
|
|
res
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
module DummyVulcanoTypes
|
|
|
|
%w(
|
|
|
|
attributes registry_key
|
|
|
|
).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)
|
2015-06-07 19:41:54 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class SshConf
|
|
|
|
def initialize *args; end
|
|
|
|
end
|
|
|
|
class PostgresConf
|
|
|
|
def initialize *args; end
|
2015-06-22 14:18:40 +00:00
|
|
|
def params *a, &b; {} end
|
2015-06-07 19:41:54 +00:00
|
|
|
end
|
|
|
|
class MysqlConf
|
|
|
|
def initialize *args; end
|
2015-06-22 14:18:40 +00:00
|
|
|
def params *a, &b; {} end
|
2015-08-12 19:03:41 +00:00
|
|
|
end
|