change model stubbing to openstack stubbing

This commit is contained in:
Anton Chuchkalov 2015-07-10 13:14:10 +03:00
parent 3117f412c0
commit fe346e3351
4 changed files with 9 additions and 25 deletions

View File

@ -39,10 +39,7 @@ module Devops
Devops::Api2.settings.mongo.create_root_user Devops::Api2.settings.mongo.create_root_user
::Provider::ProviderFactory.init(config) ::Provider::ProviderFactory.init(config)
if config[:stub_classes] Stubber.stub_providers! if config[:stub_classes]
Stubber.stub_providers!
Stubber.stub_models!
end
end end
def routes def routes

View File

@ -2,8 +2,4 @@ module Stubber
def self.stub_providers! def self.stub_providers!
Dir["tests/stubs/providers/*.rb"].each {|file| require file } Dir["tests/stubs/providers/*.rb"].each {|file| require file }
end end
def self.stub_models!
Dir["tests/stubs/models/stack/*.rb"].each {|file| require file }
end
end end

View File

@ -1,17 +0,0 @@
puts '!!! WARNING: Some StackOpenstack methods are stubbed'
module Devops
module Model
class StackOpenstack < StackBase
def create_stack_in_cloud!
self.cloud_stack_id = '4c712026-dcd5-4664-90b8-0915494c1332'
end
def delete_stack_in_cloud!
true
end
end
end
end

View File

@ -63,4 +63,12 @@ class Provider::Openstack
] ]
end end
def create_stack(stack)
'4c712026-dcd5-4664-90b8-0915494c1332'
end
def delete_stack(stack)
true
end
end end