mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[glesys|compute] fixes to play nice with mock tests
This commit is contained in:
parent
ae7294bdfd
commit
455707b194
2 changed files with 20 additions and 9 deletions
|
@ -36,12 +36,28 @@ module Fog
|
|||
|
||||
class Mock
|
||||
|
||||
def initialize(options)
|
||||
Fog::Mock.not_implemented
|
||||
def initialize(options={})
|
||||
@api_url = options[:glesys_api_url] || Fog.credentials[:glesys_api_url] || API_URL
|
||||
@glesys_username = options[:glesys_username] || Fog.credentials[:glesys_api_key]
|
||||
@glesys_api_key = options[:glesys_api_key] || Fog.credentials[:glesys_api_key]
|
||||
@connection_options = options[:connection_options] || {}
|
||||
end
|
||||
|
||||
def request(method_name, options = {})
|
||||
Fog::Mock.not_implemented
|
||||
def self.data
|
||||
@data ||= {
|
||||
}
|
||||
end
|
||||
|
||||
def self.reset
|
||||
@data = nil
|
||||
end
|
||||
|
||||
def data
|
||||
self.class.data
|
||||
end
|
||||
|
||||
def reset_data
|
||||
self.class.reset
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -46,7 +46,6 @@ module Fog
|
|||
|
||||
def self.data
|
||||
@data ||= {
|
||||
:zones => {}
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -54,10 +53,6 @@ module Fog
|
|||
@data = nil
|
||||
end
|
||||
|
||||
def auth_token
|
||||
@auth_token ||= Fog::Dynect::Mock.token
|
||||
end
|
||||
|
||||
def data
|
||||
self.class.data
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue