Skip to content

Commit 2144ad4

Browse files
azure-sdkscbeddHarshaNalluru
authored
Sync eng/common directory with azure-sdk-tools for PR 2585 (Azure#19958)
* updating to target test-proxy that only gets filename from body of /start request * set TestProxy to true in core/ci.yml * patch recorder.ts to include filename into body of /start request Co-authored-by: scbedd <[email protected]> Co-authored-by: Harsha Nalluru <[email protected]>
1 parent fe00754 commit 2144ad4

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

eng/common/testproxy/docker-start-proxy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ catch {
3131
Write-Error "Please check your docker invocation and try running the script again."
3232
}
3333

34-
$SELECTED_IMAGE_TAG = "1294199"
34+
$SELECTED_IMAGE_TAG = "1314089"
3535
$CONTAINER_NAME = "ambitious_azsdk_test_proxy"
3636
$LINUX_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:${SELECTED_IMAGE_TAG}"
3737
$WINDOWS_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:${SELECTED_IMAGE_TAG}"

eng/common/testproxy/test-proxy-tool.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ steps:
1616
dotnet tool install azure.sdk.tools.testproxy `
1717
--tool-path $(Build.BinariesDirectory)/test-proxy `
1818
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json `
19-
--version 1.0.0-dev.20220113.1
19+
--version 1.0.0-dev.20220119.2
2020
displayName: "Install test-proxy"
2121
2222
- pwsh: |

sdk/core/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ extends:
3535
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
3636
parameters:
3737
ServiceDirectory: core
38+
TestProxy: true
3839
Artifacts:
3940
- name: azure-abort-controller
4041
safeName: azureabortcontroller

sdk/test-utils/recorder/src/recorder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export class Recorder {
218218
private _createRecordingRequest(url: string, method: HttpMethods = "POST") {
219219
const req = createPipelineRequest({ url, method });
220220
if (ensureExistence(this.sessionFile, "sessionFile")) {
221-
req.headers.set("x-recording-file", this.sessionFile);
221+
req.body = JSON.stringify({ "x-recording-file": this.sessionFile });
222222
}
223223
if (this.recordingId !== undefined) {
224224
req.headers.set("x-recording-id", this.recordingId);

sdk/test-utils/recorder/test/testProxyClient.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ describe("TestProxyClient functions", () => {
281281
const returnedRequest = client["_createRecordingRequest"](initialRequest.url);
282282
expect(returnedRequest.url).to.equal(initialRequest.url);
283283
expect(returnedRequest.method).to.equal("POST");
284-
expect(returnedRequest.headers.get("x-recording-file")).not.to.be.undefined;
284+
expect(returnedRequest.body).not.to.be.undefined;
285285
expect(returnedRequest.headers.get("x-recording-id")).to.equal(client.recordingId);
286286
expect(returnedRequest.url).to.equal(initialRequest.url);
287287
});

0 commit comments

Comments
 (0)