-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Recorder] Remove function bunch - setReplaceableVariables, setReplacements, skipQueryParams #7133
[Recorder] Remove function bunch - setReplaceableVariables, setReplacements, skipQueryParams #7133
Conversation
…to harshan/PR-followup/7083-stg-q-remove-funcs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add [BREAKING] prefix to the statement.
env.SECRET = "SECRET"; | ||
const replaceableVariables = {}; | ||
|
||
setEnvironmentVariables(replaceableVariables); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once setEnvironmentVariables has the environment object parametrized, this unit test won't need to change the global environment object!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, but still changing the global environment object to actually test the feature.
…to harshan/PR-followup/7083-stg-q-remove-funcs
…/github.com/HarshaNalluru/azure-sdk-for-js into harshan/PR-followup/7083-stg-q-remove-funcs
@@ -14,7 +14,7 @@ export async function authenticate(that: any): Promise<any> { | |||
AZURE_TENANT_ID: "azure_tenant_id", | |||
KEYVAULT_NAME: "keyvault_name" | |||
}, | |||
replaceInRecordings: [ | |||
customizationsOnRecordings: [ | |||
(recording: any): any => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up on the rename, @willmtemple !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
…to harshan/PR-followup/7083-stg-q-remove-funcs
Changes in the PR
Changes in the recorder package
replaceableVariables
,queryParameters
,replacements
that are being globally set.BaseRecorder
class and passing them as arguments to the functions that use them whenever required.setReplaceableVariables
,setReplacements
,skipQueryParams
and hence removed the three functions.setEnvironmentVariables
, which is as of now used for playback only (there are plans for its usage insoft-record
).setEnvironmentVariables
.Changes in recorder, storage and keyvault packages
replaceInRecordings
->customizationsOnRecordings
replaceInRecordings
attribute ofRecorderEnvironmentSetup
tocustomizationsOnRecordings
which I think is more appropriate.(And also I couldn't wrap my head around too many
replace-
prefixed words.)replaceInRecordings
in the storage and keyvault tests.