incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r1140489 - /incubator/deltacloud/trunk/server/tests/common.rb
Date Tue, 28 Jun 2011 09:01:17 GMT
Author: lutter
Date: Tue Jun 28 09:01:17 2011
New Revision: 1140489

URL: http://svn.apache.org/viewvc?rev=1140489&view=rev
Log:
* tests/common.rb (require_authentication?): remove API_USER from ENV

Modified:
    incubator/deltacloud/trunk/server/tests/common.rb

Modified: incubator/deltacloud/trunk/server/tests/common.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/common.rb?rev=1140489&r1=1140488&r2=1140489&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/tests/common.rb (original)
+++ incubator/deltacloud/trunk/server/tests/common.rb Tue Jun 28 09:01:17 2011
@@ -148,8 +148,13 @@ module DeltacloudTestCommon
 
   # Check if given URI require authentication
   def require_authentication?(uri)
+    # We need to make sure we don't have both API_USER and API_PASSWORD
+    # set in the environment; otherwise LazyAuth will use those instead
+    # of asking for credentials
+    api_user = ENV.delete("API_USER")
     get uri, {}
-    true if last_response.status == 401
+    ENV["API_USER"] = api_user
+    last_response.status == 401
   end
 
   def with_provider(new_provider, &block)



Mime
View raw message