You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2013/03/11 22:36:15 UTC
[3/41] git commit: RHEVM tests: do not record
username/password/hostname with VCR
RHEVM tests: do not record username/password/hostname with VCR
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/a97aac4f
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/a97aac4f
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/a97aac4f
Branch: refs/heads/master
Commit: a97aac4f531d076a6fa43409979dd52790a8cb0f
Parents: 47bebc1
Author: David Lutterkort <lu...@redhat.com>
Authored: Thu Mar 7 09:43:38 2013 -0800
Committer: David Lutterkort <lu...@redhat.com>
Committed: Mon Mar 11 12:17:50 2013 -0700
----------------------------------------------------------------------
server/tests/drivers/rhevm/common.rb | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a97aac4f/server/tests/drivers/rhevm/common.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/rhevm/common.rb b/server/tests/drivers/rhevm/common.rb
index b3d3a63..28787bd 100644
--- a/server/tests/drivers/rhevm/common.rb
+++ b/server/tests/drivers/rhevm/common.rb
@@ -18,6 +18,14 @@ VCR.configure do |c|
# NOTE: Empty this directory before re-recording
c.cassette_library_dir = File.join(File.dirname(__FILE__), 'fixtures')
c.hook_into :webmock
+ # Rewrite sensitive information before recording
+ c.before_record do |i|
+ u = URI::parse(i.request.uri)
+ u.host = "rhevm.example.com"
+ u.user = "fakeuser"
+ u.password = "fakepassword"
+ i.request.uri = u.to_s
+ end
# Set :record to :all, when re-recording and between re-record attemps
# be sure to clear fixtures/*.yml files which can be done with "git checkout".
# e.g.: