Skip to content

Commit 2ab9cdb

Browse files
authored
Merge branch 'master' into release-2020-12-29-v2
2 parents ef65c5d + 84456d0 commit 2ab9cdb

File tree

139 files changed

+3603
-1790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+3603
-1790
lines changed

src/BotService/custom/New-AzBotService.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ function New-AzBotService {
196196
Write-Error $NameAvailabilityResponse.Message
197197
throw
198198
}
199+
if ($PSBoundParameters.ContainsKey('SubscriptionId')) {
200+
$EnvPSBoundParameters['SubscriptionId'] = [System.String]$SubscriptionId
201+
}
199202
if ($BotKind -eq $Kind)
200203
{
201204
if (-not $PSBoundParameters.ContainsKey('DisplayName'))

src/BotService/test/Initialize-AzBotServicePrepareDeploy.Tests.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ while(-not $mockingPath) {
1212
. ($mockingPath | Select-Object -First 1).FullName
1313

1414
Describe 'Initialize-AzBotServicePrepareDeploy' {
15-
It '__AllParameterSets' -skip {
16-
# Join-Path $PSScriptRoot 'resources\MyEchoBot'
15+
It '__AllParameterSets' -Skip {
1716
Initialize-AzBotServicePrepareDeploy -CodeDir $env.NewBotService2 -ProjFileName EchoBot.csproj
1817
$IsExit = Test-Path "$($env.NewBotService2)\.deployment"
1918
$IsExit | Should -Be $True

src/BotService/test/New-AzBotService.Recording.json

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"New-AzBotService+[NoContext]+WebApp+$POST+https://management.azure.com/providers/Microsoft.BotService/checkNameAvailability?api-version=2018-07-12+1": {
2+
"New-AzBotService+[NoContext]+Registration+$POST+https://management.azure.com/providers/Microsoft.BotService/checkNameAvailability?api-version=2018-07-12+1": {
33
"Request": {
44
"Method": "POST",
55
"RequestUri": "https://management.azure.com/providers/Microsoft.BotService/checkNameAvailability?api-version=2018-07-12",
6-
"Content": "{\r\n \"name\": \"BotService-v5kgny\",\r\n \"type\": \"sdk\"\r\n}",
6+
"Content": "{\r\n \"name\": \"BotService-02le6b\",\r\n \"type\": \"bot\"\r\n}",
77
"Headers": {
88
},
99
"ContentHeaders": {
@@ -19,11 +19,11 @@
1919
"Vary": [ "Accept-Encoding" ],
2020
"x-ms-ratelimit-remaining-tenant-writes": [ "1199" ],
2121
"Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ],
22-
"x-ms-request-id": [ "c1582637-c843-4584-b09b-d7df1984c07d" ],
23-
"x-ms-correlation-request-id": [ "c1582637-c843-4584-b09b-d7df1984c07d" ],
24-
"x-ms-routing-request-id": [ "SOUTHEASTASIA:20201216T123323Z:c1582637-c843-4584-b09b-d7df1984c07d" ],
22+
"x-ms-request-id": [ "196a3fb6-347e-4f44-8b02-ace52a682398" ],
23+
"x-ms-correlation-request-id": [ "196a3fb6-347e-4f44-8b02-ace52a682398" ],
24+
"x-ms-routing-request-id": [ "SOUTHEASTASIA:20201222T065124Z:196a3fb6-347e-4f44-8b02-ace52a682398" ],
2525
"X-Content-Type-Options": [ "nosniff" ],
26-
"Date": [ "Wed, 16 Dec 2020 12:33:23 GMT" ]
26+
"Date": [ "Tue, 22 Dec 2020 06:51:24 GMT" ]
2727
},
2828
"ContentHeaders": {
2929
"Content-Length": [ "42" ],
@@ -32,5 +32,39 @@
3232
},
3333
"Content": "{\"valid\":true,\"message\":\"\",\"absCode\":null}"
3434
}
35+
},
36+
"New-AzBotService+[NoContext]+Registration+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/youriBotService-rg-g0j9s3/providers/Microsoft.BotService/botServices/BotService-02le6b?api-version=2018-07-12+2": {
37+
"Request": {
38+
"Method": "PUT",
39+
"RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/youriBotService-rg-g0j9s3/providers/Microsoft.BotService/botServices/BotService-02le6b?api-version=2018-07-12",
40+
"Content": "{\r\n \"sku\": {\r\n \"name\": \"F0\"\r\n },\r\n \"location\": \"global\",\r\n \"kind\": \"bot\",\r\n \"properties\": {\r\n \"displayName\": \"BotService-02le6b\",\r\n \"endpoint\": \"\",\r\n \"msaAppId\": \"2d00693f-17b0-4b43-b850-1d3fb485272e\"\r\n }\r\n}",
41+
"Headers": {
42+
},
43+
"ContentHeaders": {
44+
"Content-Type": [ "application/json" ],
45+
"Content-Length": [ "225" ]
46+
}
47+
},
48+
"Response": {
49+
"StatusCode": 201,
50+
"Headers": {
51+
"Cache-Control": [ "no-cache" ],
52+
"Pragma": [ "no-cache" ],
53+
"ETag": [ "\"0100ff99-0000-1800-0000-5fe197720000\"" ],
54+
"x-ms-request-id": [ "5746c342-bc8e-4d3f-9e96-4f1088dd16bd" ],
55+
"Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ],
56+
"x-ms-ratelimit-remaining-subscription-writes": [ "1199" ],
57+
"x-ms-correlation-request-id": [ "164fe878-e220-4eba-989a-8a6508d75069" ],
58+
"x-ms-routing-request-id": [ "SOUTHEASTASIA:20201222T065132Z:164fe878-e220-4eba-989a-8a6508d75069" ],
59+
"X-Content-Type-Options": [ "nosniff" ],
60+
"Date": [ "Tue, 22 Dec 2020 06:51:32 GMT" ]
61+
},
62+
"ContentHeaders": {
63+
"Content-Length": [ "1069" ],
64+
"Content-Type": [ "application/json; charset=utf-8" ],
65+
"Expires": [ "-1" ]
66+
},
67+
"Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/youriBotService-rg-g0j9s3/providers/Microsoft.BotService/botServices/BotService-02le6b\",\"name\":\"BotService-02le6b\",\"type\":\"Microsoft.BotService/botServices\",\"etag\":\"\\\"0100ff99-0000-1800-0000-5fe197720000\\\"\",\"location\":\"global\",\"sku\":{\"name\":\"F0\"},\"kind\":\"bot\",\"tags\":{},\"properties\":{\"displayName\":\"BotService-02le6b\",\"description\":null,\"iconUrl\":\"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png\",\"endpoint\":\"\",\"msaAppId\":\"2d00693f-17b0-4b43-b850-1d3fb485272e\",\"developerAppInsightKey\":null,\"developerAppInsightsApplicationId\":null,\"luisAppIds\":[],\"endpointVersion\":\"3.0\",\"configuredChannels\":[\"webchat\"],\"enabledChannels\":[\"webchat\",\"directline\"],\"isDeveloperAppInsightsApiKeySet\":false,\"isStreamingSupported\":false,\"publishingCredentials\":null,\"parameters\":null,\"allSettings\":null,\"manifestUrl\":null,\"storageResourceId\":null,\"migrationToken\":null,\"isCmekEnabled\":false,\"cmekKeyVaultUrl\":null,\"cmekEncryptionStatus\":\"Off\",\"provisioningState\":\"Succeeded\"}}"
68+
}
3569
}
3670
}

src/BotService/test/New-AzBotService.Tests.ps1

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,16 @@ while(-not $mockingPath) {
1212
. ($mockingPath | Select-Object -First 1).FullName
1313

1414
Describe 'New-AzBotService' {
15-
It 'Registration' -skip {
16-
$NewApplication = New-AzApplicationInsights -ResourceGroupName $env.ResourceGroupName -Name $env.WebApplicationName1 -Location $env.Location
17-
$NewAzBot = New-AzBotService -ResourceGroupName $env.ResourceGroupName -Name $env.NewBotService1 -ApplicationId $NewApplication.AppId -Location $env.Location -Sku F0 -Description "description" -Registration
15+
It 'Registration' {
16+
$NewAzBot = New-AzBotService -ResourceGroupName $env.ResourceGroupName -Name $env.NewBotService1 -ApplicationId $env.WebApplication1 -Location $env.Location -Sku F0 -Description "description" -Registration
1817
$NewAzBot.Name | Should -Be $env.NewBotService1
1918
}
2019

2120
#this case use the cmdlet 'New-AzResourceGroupDeployment' and it is can not be recorded.
2221
It 'WebApp' -Skip {
23-
$NewApplication = New-AzApplicationInsights -ResourceGroupName $env.ResourceGroupName -Name $env.WebApplicationName2 -Location $env.Location
2422
$ApplicationSecret = ConvertTo-SecureString -String $env.Secret -Force -AsPlainText
2523
write-host $ApplicationSecret
26-
$NewAzBot = New-AzBotService -ResourceGroupName $env.ResourceGroupName -Name $env.NewBotService2 -ApplicationId $NewApplication.AppId -Location $env.Location -Sku F0 -Description "description" -ApplicationSecret $ApplicationSecret -Webapp
24+
$NewAzBot = New-AzBotService -ResourceGroupName $env.ResourceGroupName -Name $env.NewBotService2 -ApplicationId $env.WebApplication2 -Location $env.Location -Sku F0 -Description "description" -ApplicationSecret $ApplicationSecret -Webapp
2725
$NewAzBot.Name | Should -Be $env.NewBotService2
2826
}
2927
}

src/BotService/test/Publish-AzBotServiceApp.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ while(-not $mockingPath) {
1212
. ($mockingPath | Select-Object -First 1).FullName
1313

1414
Describe 'Publish-AzBotServiceApp' {
15-
It '__AllParameterSets' -skip {
15+
It '__AllParameterSets' -Skip {
1616
$PublishService = Publish-AzBotServiceApp -ResourceGroupName $env.ResourceGroupName -Name $env.NewBotService2 -CodeDir "./$($env.NewBotService2)"
1717
$PublishService.Name | Should -Be $env.NewBotService2
1818
}

src/BotService/test/env.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47",
3-
"WebApplicationName2": "WebApplication-r5tseq",
4-
"WebApplicationName1": "WebApplication-prq7cs",
3+
"WebApplication2": "88527e5d-3cc9-4c64-905e-f6d4f59a45f3",
4+
"WebApplication1": "2d00693f-17b0-4b43-b850-1d3fb485272e",
55
"NewBotService1": "BotService-02le6b",
66
"SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f",
77
"ResourceGroupName": "youriBotService-rg-g0j9s3",

src/BotService/test/utils.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ function setupEnv() {
1616
Import-Module Az.Resources
1717
Import-Module Az.Websites
1818
# For any resources you created for test, you should add it to $env here.
19-
$WebApplicationName1 = 'WebApplication-' + (RandomString -allChars $false -len 6)
20-
$WebApplicationName2 = 'WebApplication-' + (RandomString -allChars $false -len 6)
19+
$WebApplication1 = '2d00693f-17b0-4b43-b850-1d3fb485272e'
20+
$WebApplication2 = '88527e5d-3cc9-4c64-905e-f6d4f59a45f3'
2121
$NewBotService1 = 'BotService-' + (RandomString -allChars $false -len 6)
2222
$NewBotService2 = 'BotService-' + (RandomString -allChars $false -len 6)
2323

2424
$Secret = "youriSecret"
25-
$null = $env.Add('WebApplicationName1', $WebApplicationName1)
26-
$null = $env.Add('WebApplicationName2', $WebApplicationName2)
25+
$null = $env.Add('WebApplication1', $WebApplication1)
26+
$null = $env.Add('WebApplication2', $WebApplication2)
2727
$null = $env.Add('NewBotService1', $NewBotService1)
2828
$null = $env.Add('NewBotService2', $NewBotService2)
2929
$null = $env.Add('Secret', $Secret)

src/Compute/Compute/help/New-AzHostGroup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Accept wildcard characters: False
164164
### -SupportAutomaticPlacement
165165
Specifies if HostGroup will enable automatic placement of vm's.
166166
Automatic placement means these VMs are placed on dedicated hosts, chosen by Azure, under the dedicated host group.
167-
If not specified, default value will be true.
167+
If not specified, default value will be false.
168168
169169
```yaml
170170
Type: bool

src/CostManagement/test/New-AzCostManagementQueryColumnObject.Tests.ps1

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/KeyVault/KeyVault.Test/ScenarioTests/SecretManagementExtensionTests.ps1

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,26 @@ function Test-SecretManagementExtension
3535

3636
Get-SecretInfo -Vault AzKeyVault
3737

38-
Get-Secret -Vault AzKeyVault -Name secret1
38+
[byte[]]$Arr = 1, 2, 3
39+
Set-Secret -Name byteArraySecret -Secret $Arr -Vault AzKeyVault #ByteArray
3940

40-
$secure = ConvertTo-SecureString -String "test" -AsPlainText -Force
41-
Set-Secret -Vault AzKeyVault -Name secret3 -SecureStringSecret $secure
41+
Set-Secret -Name stringSecret -Secret 'test' -Vault AzKeyVault # String value
4242

43-
Get-SecretInfo -Vault AzKeyVault
44-
Remove-Secret -Vault AzKeyVault -Name secret3
43+
$credential = [System.Management.Automation.PSCredential]::new('<user>', ('<pwd>' | ConvertTo-SecureString -AsPlainText -Force))
44+
Set-Secret -Name credentialSecret -Secret $credential -Vault AzKeyVault # PSCredential
45+
46+
$hashtable = @{'<key>'='<value>'}
47+
Set-Secret -Name hashtableSecret -Secret $hashtable -Vault AzKeyVault # Hashtable
48+
49+
$secure = ConvertTo-SecureString -String "<text1>" -AsPlainText -Force
50+
Set-Secret -Name secureSecret -SecureStringSecret $secure -Vault AzKeyVault
51+
52+
$secureString = ConvertTo-SecureString -String "<text2>" -AsPlainText -Force
53+
Set-Secret -Name secureStringSecret -SecureStringSecret $secureString -Vault AzKeyVault
54+
55+
Get-SecretInfo -Vault AzKeyVault
4556

57+
Get-Secret -Vault AzKeyVault -Name secureSecret
4658

59+
Get-SecretInfo -Vault AzKeyVault | Remove-Secret -Vault AzKeyVault
4760
}

0 commit comments

Comments
 (0)