1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

fix tests

This commit is contained in:
Eugene Howe 2016-09-21 15:12:32 -04:00
parent 83c6505e0f
commit 1f69f616ad
3 changed files with 10 additions and 2 deletions

View file

@ -26,7 +26,6 @@ module Fog
if attributes[:flagged_resources] if attributes[:flagged_resources]
map_flagged_resources! map_flagged_resources!
attributes[:flagged_resources] = map_resources(attributes[:flagged_resources])
service.flagged_resources.load(attributes[:flagged_resources]) service.flagged_resources.load(attributes[:flagged_resources])
else else
nil nil
@ -41,7 +40,7 @@ module Fog
def category_specific_summary(lazy=true) def category_specific_summary(lazy=true)
populate_extended_attributes(lazy) if attributes[:category_specific_summary].nil? populate_extended_attributes(lazy) if attributes[:category_specific_summary].nil?
attributes[:category_specific_summary] attributes[:category_stecific_summary]
end end
def resources_summary(lazy=true) def resources_summary(lazy=true)

View file

@ -68,6 +68,10 @@ module Fog
@data = nil @data = nil
end end
def reset
self.class.reset
end
attr_accessor :region attr_accessor :region
def initialize(options={}) def initialize(options={})

View file

@ -3,6 +3,11 @@ Shindo.tests("AWS::Support | describe_trusted_advisor_checks", ['aws', 'support'
Fog::AWS[:support].describe_trusted_advisor_checks.body Fog::AWS[:support].describe_trusted_advisor_checks.body
end end
# things get weird in the mocked data depending on the order the model and requests run in
if Fog.mocking?
Fog::AWS[:support].reset
end
@check_id = Fog::AWS[:support].describe_trusted_advisor_checks.body['checks'].first['id'] @check_id = Fog::AWS[:support].describe_trusted_advisor_checks.body['checks'].first['id']
tests("#describe_trusted_advisor_check_result(id: #{@check_id})").formats(AWS::Support::Formats::DESCRIBE_TRUSTED_ADVISOR_CHECK_RESULT) do tests("#describe_trusted_advisor_check_result(id: #{@check_id})").formats(AWS::Support::Formats::DESCRIBE_TRUSTED_ADVISOR_CHECK_RESULT) do