Skip to content

Commit 930d60e

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 e4cbf7b commit 930d60e

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
@@ -65,8 +65,8 @@ def header_sanitizer(response_header, transient_headers)
6565
config.configure_rspec_metadata! # Auto-detects the cassette name based on the example's full description
6666

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

7272
VcrSecrets.define_all_cassette_placeholders(config, :ibm_cloud_power)

0 commit comments

Comments
 (0)