diff --git a/lib/fog/aws/requests/auto_scaling/resume_processes.rb b/lib/fog/aws/requests/auto_scaling/resume_processes.rb index f66eef881..bd653fc33 100644 --- a/lib/fog/aws/requests/auto_scaling/resume_processes.rb +++ b/lib/fog/aws/requests/auto_scaling/resume_processes.rb @@ -40,7 +40,16 @@ module Fog class Mock 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 diff --git a/lib/fog/aws/requests/auto_scaling/suspend_processes.rb b/lib/fog/aws/requests/auto_scaling/suspend_processes.rb index 9c623a3a3..68edf0f7c 100644 --- a/lib/fog/aws/requests/auto_scaling/suspend_processes.rb +++ b/lib/fog/aws/requests/auto_scaling/suspend_processes.rb @@ -44,10 +44,15 @@ module Fog def suspend_processes(auto_scaling_group_name, options = {}) 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 - Fog::Mock.not_implemented + response = Excon::Response.new + response.status = 200 + response.body = { + 'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id } + } + response end end diff --git a/tests/aws/requests/auto_scaling/model_tests.rb b/tests/aws/requests/auto_scaling/model_tests.rb index ab813ecfe..be07e1e36 100644 --- a/tests/aws/requests/auto_scaling/model_tests.rb +++ b/tests/aws/requests/auto_scaling/model_tests.rb @@ -1,8 +1,6 @@ Shindo.tests('AWS::AutoScaling | model_tests', ['aws', 'auto_scaling']) do tests('success') do - pending if Fog.mocking? - lc = nil lc_id = 'fog-model-lc' @@ -62,7 +60,7 @@ Shindo.tests('AWS::AutoScaling | model_tests', ['aws', 'auto_scaling']) do tests('suspend processes') do asg.suspend_processes() - #tests('processes suspended').returns([]) { asg.suspended_processes } + tests('processes suspended').returns([]) { asg.suspended_processes } end tests('resume processes') do