2015-09-03 20:36:46 +02:00
|
|
|
# encoding: utf-8
|
2015-06-07 21:41:54 +02:00
|
|
|
# Copyright 2014 Dominik Richter. All rights reserved.
|
|
|
|
# Spec file for Vulcano specs
|
|
|
|
|
|
|
|
# Get types
|
2015-08-29 17:36:02 -07:00
|
|
|
module DummyTestTypes
|
2015-06-07 21:41:54 +02:00
|
|
|
# a few commands with special handling
|
2015-09-25 14:40:52 +02:00
|
|
|
def describe(*_args); end
|
|
|
|
|
|
|
|
def context(*_args); end
|
2015-06-07 21:41:54 +02:00
|
|
|
|
|
|
|
def os
|
|
|
|
{}
|
|
|
|
end
|
|
|
|
|
2015-09-25 14:40:52 +02:00
|
|
|
def command(_sth)
|
2015-06-07 21:41:54 +02:00
|
|
|
res = OpenStruct.new
|
2015-09-03 23:18:28 +02:00
|
|
|
res.stdout = ''
|
|
|
|
res.stderr = ''
|
2015-06-07 21:41:54 +02:00
|
|
|
res
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
module DummyVulcanoTypes
|
2015-09-05 16:07:54 +02:00
|
|
|
%w{
|
2015-06-07 21:41:54 +02:00
|
|
|
attributes registry_key
|
2015-09-05 16:07:54 +02:00
|
|
|
}.each do |name|
|
2015-09-25 14:40:52 +02:00
|
|
|
define_method name do |*_arg|
|
2015-06-07 21:41:54 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-09-25 14:40:52 +02:00
|
|
|
def processes(*_args)
|
|
|
|
[]
|
|
|
|
end
|
|
|
|
|
|
|
|
def start_postgres_session(*_args)
|
|
|
|
Describer.new
|
|
|
|
end
|
|
|
|
|
|
|
|
def start_mysql_session(*_args)
|
|
|
|
Describer.new
|
|
|
|
end
|
2015-06-07 21:41:54 +02:00
|
|
|
|
|
|
|
class Describer
|
2015-09-25 14:40:52 +02:00
|
|
|
def describe(*_args); end
|
2015-06-07 21:41:54 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class SshConf
|
2015-09-25 14:40:52 +02:00
|
|
|
def initialize(*_args); end
|
2015-06-07 21:41:54 +02:00
|
|
|
end
|
|
|
|
class PostgresConf
|
2015-09-25 14:40:52 +02:00
|
|
|
def initialize(*_args); end
|
|
|
|
|
|
|
|
def params(*_a, &_b)
|
|
|
|
{}
|
|
|
|
end
|
2015-06-07 21:41:54 +02:00
|
|
|
end
|
2015-09-25 14:40:52 +02:00
|
|
|
|
2015-06-07 21:41:54 +02:00
|
|
|
class MysqlConf
|
2015-09-25 14:40:52 +02:00
|
|
|
def initialize(*_args); end
|
|
|
|
|
|
|
|
def params(*_a, &_b)
|
|
|
|
{}
|
|
|
|
end
|
2015-08-12 12:03:41 -07:00
|
|
|
end
|