-
Notifications
You must be signed in to change notification settings - Fork 150
Test proxy #4118
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
Test proxy #4118
Changes from all commits
245aec9
f2d0cd2
5163b4b
5f167f5
bd2e83d
e909d0d
be4d0a5
6be1746
5fd600d
0344c18
500ad06
e0652d7
5f07669
5663316
c6e4a2c
fde3e1b
a011460
ef62335
0021327
4325d38
22b2701
eb064bb
948a0dc
308a9df
692b885
3c77e25
0974890
113a74b
2869888
df70807
64f0afb
3f85098
cb298cf
b2082d9
edd1226
9c680f9
5784894
f04d41c
7b16d59
6ca954e
04c8763
71321c2
58ceb2c
11a91b2
32b32e1
3913411
e8a6aef
25cfe67
7a6a0a9
6b1058a
e4fab9f
2aae9c3
41a51e3
0daeda7
96af696
0e3731b
97c81a5
526569e
efbaeec
ed388ff
974b71b
992e3d0
3c5374a
69de764
2598557
89c3164
a458b33
db2d607
32af793
ed8dcb8
2776e75
b9f15d2
84d5cb7
a89fc6b
c0044fc
d5552b8
ad3c323
85512b4
f2aaa54
b0b5a71
5cd93b3
3bf64b1
85832dc
4970b93
6a3f69d
3db489f
be1bd3d
a2b9b0d
97cf514
b9a5aa6
6c5a735
0c5266f
fbed1e0
e71848c
aa87c77
8d52e19
1ef452e
ba46d2d
873e6eb
05146fd
e2faf50
549c7d4
1f028af
0f99f96
cbe62cb
d4460d3
f348c3c
92db77d
3e7d948
f014d44
bcdef12
458d14f
5e2f036
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # SPDX-License-Identifier: MIT | ||
| # | ||
|
|
||
| macro(CopyTestProxyScripts) | ||
gearama marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| file(COPY ${CMAKE_SOURCE_DIR}/eng/Scripts/Start-TestProxy.ps1 | ||
| DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) | ||
| file(COPY ${CMAKE_SOURCE_DIR}/eng/Scripts/Stop-TestProxy.ps1 | ||
| DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) | ||
| endmacro() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| param( | ||
gearama marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| [Parameter(Mandatory=$True)] | ||
| [string] $AssetsPath | ||
| ) | ||
| # check is there is another test-proxy running | ||
| $running = Get-Process -Name test-proxy | ||
| echo $AssetsPath | ||
| if($running) | ||
| { | ||
| echo "test-proxy running, no need for new instance" | ||
| exit 0 | ||
| } | ||
|
|
||
| # make sure errors collection is empty | ||
| $error.clear() | ||
gearama marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| #check if we have a test-proxy available | ||
| $CurrentVersion = (Get-Command -Name "test-proxy" -ErrorAction SilentlyContinue).Version | ||
|
|
||
| if($error){ | ||
gearama marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo "Will install testproxy" | ||
|
|
||
| dotnet tool update azure.sdk.tools.testproxy --global --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json --version "1.0.0-dev*" | ||
gearama marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # clear the errors again | ||
| $error.clear() | ||
|
|
||
| #check again for test proxy presence | ||
| $CurrentVersion = (Get-Command -Name "test-proxy" -ErrorAction SilentlyContinue).Version | ||
|
|
||
| # if we have errors this means we had issues installing it , needs to be done by hand | ||
| if($error){ | ||
| echo "Unable to install testproxy. Try installing manually." | ||
| exit 1 | ||
| } | ||
| } | ||
|
|
||
| echo "Start test proxy with argument list --storage-location $AssetsPath" | ||
| #starts it in a separate process that will outlive pwsh in order to serve requests. | ||
| Start-Process 'test-proxy' -ArgumentList "--storage-location $AssetsPath" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| Stop-Process -Name "test-proxy" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "AssetsRepo": "Azure/azure-sdk-assets", | ||
| "AssetsRepoPrefixPath": "cpp", | ||
| "TagPrefix": "cpp/attestation", | ||
| "Tag": "cpp/attestation_b384d96f95" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this tag mean and where does this suffix
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that is autogenerated by the test proxy on upload , not to be manually edited, will be updated on next upload.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is that documented somewhere? Please share a link, and we may want to add that as a comment, on in a readme in a file close to/related to the test proxy ones, in this repo. |
||
| } | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.