Skip to content

Commit 82a1537

Browse files
committed
Expand VCR URIs that need to be sanitized
The default IAM uri for power_virtual_servers is 'https://iam.cloud.ibm.com/identity/token#apikey'. The resource controller URI starts with 'https://resource-controller.cloud.ibm.com' (no 'iaas' subdomain). There's no harm in sanitizing _any_ domain with cloud.ibm in it.
1 parent 7d15b72 commit 82a1537

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/spec_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def header_sanitizer(response_header, transient_headers)
6969
config.cassette_library_dir = File.join(ManageIQ::Providers::IbmCloud::Engine.root, 'spec/vcr_cassettes')
7070

7171
config.before_record do |i|
72-
replace_token_contents(i) if i.request.uri == "https://iam.cloud.ibm.com/identity/token"
73-
vpc_sanitizer(i) if i.request.uri.match?('iaas.cloud.ibm') || i.request.uri.match?('tags.global-search-tagging')
72+
replace_token_contents(i) if i.request.uri.start_with?("https://iam.cloud.ibm.com/identity/token")
73+
vpc_sanitizer(i) if i.request.uri.match?('cloud.ibm') || i.request.uri.match?('tags.global-search-tagging')
7474
end
7575

7676
secrets = Rails.application.secrets

0 commit comments

Comments
 (0)