update readme.md (#26)
This commit is contained in:
Родитель
da11b0346a
Коммит
ad26a704c0
40
README.md
40
README.md
|
@ -4,16 +4,48 @@ The project to provide automation E2E test on SignalR sdk and service runtime.
|
||||||
## How to build and run
|
## How to build and run
|
||||||
First check the SDK version needed. Each SDKVerison will build a separate docker image and the tag is the sdk version.
|
First check the SDK version needed. Each SDKVerison will build a separate docker image and the tag is the sdk version.
|
||||||
```bash
|
```bash
|
||||||
# build-image.sh
|
declare -a SDKVersion=("1.5.0" "1.5.1")
|
||||||
declare -a SDKVersion=("1.0.0-preview1-10009" "1.0.0-preview1-10011")
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Run tests for Server SDK
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./build-image.sh
|
./build-sdk-image.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you can run the test with Azure SignalR Service
|
Then you can run the test with Azure SignalR Service
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -e Azure__SignalR__ConnectionString="<your connection string>" signalr-test:<sdk version>
|
docker run -e Azure__SignalR__ConnectionString="<your connection string>" signalr-test:<sdk version>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### Run tests with app server AAD Auth
|
||||||
|
|
||||||
|
This test case is for a specific scenario, in which our customer used AAD Auth to authenticate their incoming requests.
|
||||||
|
|
||||||
|
Our SDK will simply pass most of the claims in the given JWT Token (for accessing their app server) to the newly generated JWT Token (for connecting to our service).
|
||||||
|
|
||||||
|
However, there are still some internal claims that will not be passed.
|
||||||
|
|
||||||
|
This test is to check if any of these unpassed claims will cause problems while connecting to ASRS.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -e Azure__SignalR__ConnectionString="<your connection string>" -e signalr-test:<sdk version> -e clientId="<clientId>" -e clientSecret="<clientSecret>" -e tenantId="<tenantId>" run-server-aad.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
> The `clientId`, `clientSecret`, `tenantId` here could be any valid [AAD Application](https://ms.portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps).
|
||||||
|
|
||||||
|
### Run tests for Management SDK
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./build-management-image.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Then you can run the test with Azure SignalR Service
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -e Azure__SignalR__ConnectionString="<your connection string>" signalr-management-sdk-test:<sdk version>
|
||||||
```
|
```
|
||||||
|
|
||||||
## How to upload images to private container registry
|
## How to upload images to private container registry
|
||||||
|
|
|
@ -47,4 +47,4 @@
|
||||||
"tslib": "^1.9.3",
|
"tslib": "^1.9.3",
|
||||||
"typescript": "^2.9.0"
|
"typescript": "^2.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"clientSecret": "gWq=wErBFjDA.HkhSteqx--44CsRg4Z4",
|
"clientSecret": "gWq=wErBFjDA.HkhSteqx--44CsRg4Z4",
|
||||||
"clientId": "7421186e-2541-48ca-ac95-9065858b11a5",
|
"clientId": "7421186e-2541-48ca-ac95-9065858b11a5",
|
||||||
|
"SERVER_AAD": "1",
|
||||||
"Azure__SignalR__ConnectionString": "Endpoint=https://azure-signalr-sdk-e2e-test.service.signalr.net;AccessKey=eG5PtBhU/TRF/p9YbusQ+6KvZqg5v9OBzqaw13ojR28=;Version=1.0;",
|
"Azure__SignalR__ConnectionString": "Endpoint=https://azure-signalr-sdk-e2e-test.service.signalr.net;AccessKey=eG5PtBhU/TRF/p9YbusQ+6KvZqg5v9OBzqaw13ojR28=;Version=1.0;",
|
||||||
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
|
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
|
||||||
"connect-with-aad": "1",
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:5000/"
|
"applicationUrl": "http://localhost:5000/"
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace Microsoft.Azure.SignalR.Test.Server
|
||||||
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
||||||
.AddJwtBearer(option =>
|
.AddJwtBearer(option =>
|
||||||
{
|
{
|
||||||
var tenantId = Environment.GetEnvironmentVariable("tenantId") ?? "";
|
var tenantId = Environment.GetEnvironmentVariable("tenantId") ?? throw new ArgumentNullException();
|
||||||
option.Authority = $"https://login.microsoftonline.com/{tenantId}";
|
option.Authority = $"https://login.microsoftonline.com/{tenantId}";
|
||||||
|
|
||||||
option.TokenValidationParameters = new TokenValidationParameters
|
option.TokenValidationParameters = new TokenValidationParameters
|
||||||
|
|
Загрузка…
Ссылка в новой задаче