Fix recordings
@@ -287,7 +287,9 @@ func createRecorder(cassetteName string, cfg config.Values, recordReplay bool) (
// Hide the tenant ID
hideCassetteString(i, azureIDs.tenantID, uuid.Nil.String())
// Hide the billing ID
+ if azureIDs.billingInvoiceID != "" {
hideCassetteString(i, azureIDs.billingInvoiceID, DummyBillingId)
+ }
// Hiding other sensitive fields
i.Request.Body = hideRecordingData(i.Request.Body)
@@ -298,17 +300,21 @@ func createRecorder(cassetteName string, cfg config.Values, recordReplay bool) (
for i := range values {
values[i] = hide(values[i], azureIDs.subscriptionID, uuid.Nil.String())
values[i] = hide(values[i], azureIDs.tenantID, uuid.Nil.String())
+ if azureIDs.billingInvoiceID != "" {
values[i] = hide(values[i], azureIDs.billingInvoiceID, DummyBillingId)
}
}
+ }
for _, values := range i.Response.Headers {
for i := range values {
values[i] = hide(values[i], azureIDs.subscriptionID, uuid.Nil.String())
values[i] = hide(values[i], azureIDs.tenantID, uuid.Nil.String())
+ if azureIDs.billingInvoiceID != "" {
values[i] = hide(values[i], azureIDs.billingInvoiceID, DummyBillingId)
}
}
+ }
for _, header := range requestHeadersToRemove {
delete(i.Request.Headers, header)
