From 4124fbc79e81bd541cac5f8e65b5f00b1b81385d Mon Sep 17 00:00:00 2001 From: Bohuslav Kabrda Date: Fri, 29 Jun 2012 15:35:08 +0200 Subject: [PATCH] Include this to make refresh_credentials_if_expired method work properly with Mock --- lib/fog/aws/compute.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fog/aws/compute.rb b/lib/fog/aws/compute.rb index 51d5ce9ae..18dce229e 100644 --- a/lib/fog/aws/compute.rb +++ b/lib/fog/aws/compute.rb @@ -138,6 +138,7 @@ module Fog end class Mock + include Fog::AWS::CredentialFetcher::ConnectionMethods def self.data @data ||= Hash.new do |hash, region| @@ -209,6 +210,7 @@ module Fog def initialize(options={}) @use_iam_profile = options[:use_iam_profile] + @aws_credentials_expire_at = Time::now + 1000 setup_credentials(options) @region = options[:region] || 'us-east-1'