Sync eng/common directory with azure-sdk-tools for PR 2585 (#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 <45376673+scbedd@users.noreply.github.com> Co-authored-by: Harsha Nalluru <sanallur@microsoft.com>
This commit is contained in:
Родитель
fe007541ba
Коммит
2144ad4eb7
|
@ -31,7 +31,7 @@ catch {
|
|||
Write-Error "Please check your docker invocation and try running the script again."
|
||||
}
|
||||
|
||||
$SELECTED_IMAGE_TAG = "1294199"
|
||||
$SELECTED_IMAGE_TAG = "1314089"
|
||||
$CONTAINER_NAME = "ambitious_azsdk_test_proxy"
|
||||
$LINUX_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:${SELECTED_IMAGE_TAG}"
|
||||
$WINDOWS_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:${SELECTED_IMAGE_TAG}"
|
||||
|
|
|
@ -16,7 +16,7 @@ steps:
|
|||
dotnet tool install azure.sdk.tools.testproxy `
|
||||
--tool-path $(Build.BinariesDirectory)/test-proxy `
|
||||
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json `
|
||||
--version 1.0.0-dev.20220113.1
|
||||
--version 1.0.0-dev.20220119.2
|
||||
displayName: "Install test-proxy"
|
||||
|
||||
- pwsh: |
|
||||
|
|
|
@ -35,6 +35,7 @@ extends:
|
|||
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
|
||||
parameters:
|
||||
ServiceDirectory: core
|
||||
TestProxy: true
|
||||
Artifacts:
|
||||
- name: azure-abort-controller
|
||||
safeName: azureabortcontroller
|
||||
|
|
|
@ -218,7 +218,7 @@ export class Recorder {
|
|||
private _createRecordingRequest(url: string, method: HttpMethods = "POST") {
|
||||
const req = createPipelineRequest({ url, method });
|
||||
if (ensureExistence(this.sessionFile, "sessionFile")) {
|
||||
req.headers.set("x-recording-file", this.sessionFile);
|
||||
req.body = JSON.stringify({ "x-recording-file": this.sessionFile });
|
||||
}
|
||||
if (this.recordingId !== undefined) {
|
||||
req.headers.set("x-recording-id", this.recordingId);
|
||||
|
|
|
@ -281,7 +281,7 @@ describe("TestProxyClient functions", () => {
|
|||
const returnedRequest = client["_createRecordingRequest"](initialRequest.url);
|
||||
expect(returnedRequest.url).to.equal(initialRequest.url);
|
||||
expect(returnedRequest.method).to.equal("POST");
|
||||
expect(returnedRequest.headers.get("x-recording-file")).not.to.be.undefined;
|
||||
expect(returnedRequest.body).not.to.be.undefined;
|
||||
expect(returnedRequest.headers.get("x-recording-id")).to.equal(client.recordingId);
|
||||
expect(returnedRequest.url).to.equal(initialRequest.url);
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче