mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
commit
d3d644460b
3 changed files with 18 additions and 6 deletions
|
@ -40,7 +40,16 @@ module Fog
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def resume_processes(auto_scaling_group_name, options = {})
|
def resume_processes(auto_scaling_group_name, options = {})
|
||||||
Fog::Mock.not_implemented
|
unless self.data[:auto_scaling_groups].has_key?(auto_scaling_group_name)
|
||||||
|
raise Fog::AWS::AutoScaling::ValidationError.new("AutoScalingGroup name not found - no such group: #{auto_scaling_group_name}")
|
||||||
|
end
|
||||||
|
|
||||||
|
response = Excon::Response.new
|
||||||
|
response.status = 200
|
||||||
|
response.body = {
|
||||||
|
'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id }
|
||||||
|
}
|
||||||
|
response
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -44,10 +44,15 @@ module Fog
|
||||||
|
|
||||||
def suspend_processes(auto_scaling_group_name, options = {})
|
def suspend_processes(auto_scaling_group_name, options = {})
|
||||||
unless self.data[:auto_scaling_groups].has_key?(auto_scaling_group_name)
|
unless self.data[:auto_scaling_groups].has_key?(auto_scaling_group_name)
|
||||||
raise Fog::AWS::AutoScaling::ValidationError.new('AutoScalingGroup name not found - null')
|
raise Fog::AWS::AutoScaling::ValidationError.new("AutoScalingGroup name not found - no such group: #{auto_scaling_group_name}")
|
||||||
end
|
end
|
||||||
|
|
||||||
Fog::Mock.not_implemented
|
response = Excon::Response.new
|
||||||
|
response.status = 200
|
||||||
|
response.body = {
|
||||||
|
'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id }
|
||||||
|
}
|
||||||
|
response
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
Shindo.tests('AWS::AutoScaling | model_tests', ['aws', 'auto_scaling']) do
|
Shindo.tests('AWS::AutoScaling | model_tests', ['aws', 'auto_scaling']) do
|
||||||
|
|
||||||
tests('success') do
|
tests('success') do
|
||||||
pending if Fog.mocking?
|
|
||||||
|
|
||||||
lc = nil
|
lc = nil
|
||||||
lc_id = 'fog-model-lc'
|
lc_id = 'fog-model-lc'
|
||||||
|
|
||||||
|
@ -62,7 +60,7 @@ Shindo.tests('AWS::AutoScaling | model_tests', ['aws', 'auto_scaling']) do
|
||||||
|
|
||||||
tests('suspend processes') do
|
tests('suspend processes') do
|
||||||
asg.suspend_processes()
|
asg.suspend_processes()
|
||||||
#tests('processes suspended').returns([]) { asg.suspended_processes }
|
tests('processes suspended').returns([]) { asg.suspended_processes }
|
||||||
end
|
end
|
||||||
|
|
||||||
tests('resume processes') do
|
tests('resume processes') do
|
||||||
|
|
Loading…
Reference in a new issue