Skip to content

Commit 7879aa2

Browse files
authored
Merge branch 'preview' into sergey-whatif
2 parents 809d05f + 3f8f25c commit 7879aa2

File tree

190 files changed

+50752
-20933
lines changed

Some content is hidden

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

190 files changed

+50752
-20933
lines changed

.gitignore

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,10 @@ groupMapping*.json
222222
*.wixpdb
223223

224224
.vscode/
225-
/tools/AutomationTestFramework/RunBooks
226-
/tools/AutomationTestFramework/TestHelpers/TestHelpers.zip
225+
/tools/AutomationTestFramework/Runbooks
227226
Results
228227
Package
229228
.DS_Store
230229
.idea
231-
/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Logger/bin
232-
/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/bin
233-
/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Helpers/bin
234-
/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Providers/bin
235-
/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.ServiceClientAdapter/bin
230+
/src/ResourceManager/RecoveryServices.Backup/**/bin
231+
launchSettings.json

appveyor.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,27 @@
11
clone_folder: c:\ps
2+
clone_depth: 1
23
branches:
34
only:
45
- master
56
environment:
6-
nodejs_version: "6"
77
github_access_token:
88
secure: VMFbecLLHzDq/09YDPbcM0VDDSwwgY57vr5GXK6cZZ4Ti/Xs5RZoylzV8MMr1350
99

1010
before_build:
11-
- ps: Get-ChildItem -Path ("$env:programfiles" + "\WindowsPowerShell\Modules") | Where-Object { $_.FullName -match 'azure' } | foreach { Remove-Item $_.FullName -Recurse -Force }
12-
- ps: Install-Module -Name PowerShellGet -Force
13-
- ps: Install-Module -Name SplitPipeline -Force
14-
- ps: Install-Module -Name platyPS -Force
15-
- ps: Install-Module -Name Azure -Force
16-
- ps: Install-Module -Name AzureRM -Force -AllowClobber
17-
- ps: Install-Module -Name AzureStack -Force -AllowClobber
18-
- ps: Install-Product node $env:nodejs_version
1911
- git config --global credential.helper store
2012
- ps: ac "$env:USERPROFILE\.git-credentials" "https://$($env:github_access_token):[email protected]`n"
2113
- git config --global user.email %email%
2214
- git config --global user.name %name%
23-
- git clone -q https://github.com/MicrosoftDocs/azure-psdocs-ciscripts azpsci
24-
- cd azpsci
25-
- npm install
26-
- npm install typescript
27-
- node ./node_modules/typescript/bin/tsc
2815
- cd ..
16+
- git clone -q https://github.com/MicrosoftDocs/azure-psdocs-ciscripts azpsci
17+
- dotnet publish azpsci -c Release -o ../ci
2918
build_script:
30-
- node azpsci/out/ci0.js src c:\projects\_output
19+
- dotnet ./ci/azpsci.dll docs
3120

3221
test: off
3322
on_success:
3423
- git clone -q --branch=%target_branch% %content_repo% %TEMP%\Azure
3524
- cd %TEMP%\Azure
36-
- ps: ls c:\projects\_output -dir | % { copy $_.FullName . -Recurse -Force }
25+
- ps: ls C:\docs -dir | % { copy $_.FullName . -Recurse -Force }
3726
- git add -A
3827
- git diff --quiet --exit-code --cached || git commit -m "Sync docs from source code repo to content repo." && git push origin %target_branch% && appveyor AddMessage "Content Updated"

src/ResourceManager/Cdn/AzureRM.Cdn.Netcore.psd1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ CmdletsToExport = 'Get-AzureRmCdnProfile', 'Get-AzureRmCdnProfileSsoUrl',
8282
'Start-AzureRmCdnEndpoint', 'Stop-AzureRmCdnEndpoint',
8383
'Test-AzureRmCdnCustomDomain', 'Get-AzureRmCdnCustomDomain',
8484
'New-AzureRmCdnCustomDomain', 'Remove-AzureRmCdnCustomDomain',
85-
'Get-AzureRmCdnProfileResourceUsage',
86-
'Get-AzureRmCdnEndpointResourceUsage',
87-
'Get-AzureRmCdnSubscriptionResourceUsage', 'Get-AzureRmCdnEdgeNodes'
85+
'Enable-AzureRmCdnCustomDomain', 'Disable-AzureRmCdnCustomDomain',
86+
'Get-AzureRmCdnProfileResourceUsage', 'Confirm-AzureRmCdnEndpointProbeUrl',
87+
'Get-AzureRmCdnEndpointResourceUsage', 'Get-AzureRmCdnProfileSupportedOptimizationType',
88+
'Get-AzureRmCdnSubscriptionResourceUsage',
89+
'Get-AzureRmCdnEdgeNodes'
8890

8991
# Variables to export from this module
9092
# VariablesToExport = @()

src/ResourceManager/Cdn/AzureRM.Cdn.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ CmdletsToExport = 'Get-AzureRmCdnProfile', 'Get-AzureRmCdnProfileSsoUrl',
8282
'Start-AzureRmCdnEndpoint', 'Stop-AzureRmCdnEndpoint',
8383
'Test-AzureRmCdnCustomDomain', 'Get-AzureRmCdnCustomDomain',
8484
'New-AzureRmCdnCustomDomain', 'Remove-AzureRmCdnCustomDomain',
85-
'Get-AzureRmCdnProfileResourceUsage',
86-
'Get-AzureRmCdnEndpointResourceUsage',
85+
'Enable-AzureRmCdnCustomDomain', 'Disable-AzureRmCdnCustomDomain',
86+
'Get-AzureRmCdnProfileResourceUsage', 'Confirm-AzureRmCdnEndpointProbeUrl',
87+
'Get-AzureRmCdnEndpointResourceUsage', 'Get-AzureRmCdnProfileSupportedOptimizationType',
8788
'Get-AzureRmCdnSubscriptionResourceUsage',
8889
'Get-AzureRmCdnEdgeNodes'
8990

@@ -142,4 +143,3 @@ PrivateData = @{
142143
# DefaultCommandPrefix = ''
143144

144145
}
145-

src/ResourceManager/Cdn/Commands.Cdn.Test/Commands.Cdn.Test.csproj

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,11 @@
5252
<Reference Include="Microsoft.Azure.Gallery">
5353
<HintPath>..\..\..\packages\Microsoft.Azure.Gallery.2.6.2-preview\lib\net40\Microsoft.Azure.Gallery.dll</HintPath>
5454
</Reference>
55-
<Reference Include="Microsoft.Azure.Management.Authorization">
56-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
57-
<Private>True</Private>
55+
<Reference Include="Microsoft.Azure.Management.Authorization, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
56+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.1\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
5857
</Reference>
59-
<Reference Include="Microsoft.Azure.Management.Cdn">
60-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Cdn.3.0.0-preview\lib\net45\Microsoft.Azure.Management.Cdn.dll</HintPath>
58+
<Reference Include="Microsoft.Azure.Management.Cdn, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
59+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Cdn.4.0.1-preview\lib\net452\Microsoft.Azure.Management.Cdn.dll</HintPath>
6160
</Reference>
6261
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6362
<SpecificVersion>False</SpecificVersion>
@@ -139,12 +138,21 @@
139138
<None Include="ScenarioTests\SubscriptionTests.ps1">
140139
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
141140
</None>
141+
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests\TestCustomDomainEnableDisableWithRunningEndpoint.json">
142+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
143+
</None>
142144
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests\TestCustomDomainGetRemoveWithRunningEndpoint.json">
143145
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
144146
</None>
145147
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests\TestCustomDomainGetRemoveWithStoppedEndpoint.json">
146148
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
147149
</None>
150+
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests\EndpointValidateProbeUrl.json">
151+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
152+
</None>
153+
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests\TestEndpointCreateWithDsa.json">
154+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
155+
</None>
148156
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests\TestEndpointCrudAndAction.json">
149157
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
150158
</None>
@@ -172,6 +180,9 @@
172180
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests\TestOriginGetSetWithStoppedEndpoint.json">
173181
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
174182
</None>
183+
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests\ProfileGetSupportedOptimizationType.json">
184+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
185+
</None>
175186
<None Include="SessionRecords\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests\TestProfileCrud.json">
176187
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
177188
</None>

src/ResourceManager/Cdn/Commands.Cdn.Test/ScenarioTests/CustomDomainTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ public CustomDomainTests(Xunit.Abstractions.ITestOutputHelper output)
2828
ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(_logger);
2929
}
3030

31+
[Fact]
32+
[Trait(Category.AcceptanceType, Category.CheckIn)]
33+
public void TestCustomDomainEnableDisableWithRunningEndpoint()
34+
{
35+
TestController.NewInstance.RunPowerShellTest(_logger, "Test-CustomDomainEnableDisableWithRunningEndpoint");
36+
}
37+
3138
[Fact]
3239
[Trait(Category.AcceptanceType, Category.CheckIn)]
3340
public void TestCustomDomainGetRemoveWithRunningEndpoint()

src/ResourceManager/Cdn/Commands.Cdn.Test/ScenarioTests/CustomDomainTests.ps1

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ Gets and removes custom domain with running endpoint.
1919
function Test-CustomDomainGetRemoveWithRunningEndpoint
2020
{
2121
# Hard-coding host and endpoint names due to requirement for DNS CNAME
22-
$endpointName = "sdktest-c83c1e8f-343e-4ce8-873b-f6e5ddcdc53f"
23-
$hostName = "sdktest-716d4572-627f-4dfe-8128-1df163647ae2.azureedge-test.net"
22+
$endpointName = "testAkamaiEP"
23+
$hostName = "testAkamai.dustydog.us"
2424

2525
$customDomainName = getAssetName
2626

2727
$profileName = getAssetName
2828
$resourceGroup = TestSetup-CreateResourceGroup
2929
$resourceLocation = "EastUS"
30-
$profileSku = "Standard_Verizon"
30+
$profileSku = "Standard_Akamai"
3131
$tags = @{"tag1" = "value1"; "tag2" = "value2"}
3232
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku -Tag $tags
3333

@@ -59,22 +59,69 @@ function Test-CustomDomainGetRemoveWithRunningEndpoint
5959
Remove-AzureRmResourceGroup -Name $resourceGroup.ResourceGroupName -Force
6060
}
6161

62+
<#
63+
.SYNOPSIS
64+
Enables custom domain with running endpoint.
65+
#>
66+
function Test-CustomDomainEnableDisableWithRunningEndpoint
67+
{
68+
# Hard-coding host and endpoint names due to requirement for DNS CNAME
69+
$endpointName = "testVerizonEP"
70+
$hostName = "testVerizon.dustydog.us"
71+
72+
$customDomainName = getAssetName
73+
74+
$profileName = getAssetName
75+
$resourceGroup = TestSetup-CreateResourceGroup
76+
$resourceLocation = "EastUS"
77+
$profileSku = "Standard_Verizon"
78+
$tags = @{"tag1" = "value1"; "tag2" = "value2"}
79+
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku -Tag $tags
80+
81+
$originName = getAssetName
82+
$originHostName = "www.microsoft.com"
83+
$createdEndpoint = New-AzureRmCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName
84+
85+
$endpoint = Get-AzureRmCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName
86+
$validateResult = Test-AzureRmCdnCustomDomain -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -CustomDomainHostName $hostName
87+
Assert-True{$validateResult.CustomDomainValidated}
88+
$validateResultbyPiping = Test-AzureRmCdnCustomDomain -CdnEndpoint $endpoint -CustomDomainHostName $hostName
89+
Assert-True{$validateResultbyPiping.CustomDomainValidated}
90+
91+
$createdCustomDomain = $endpoint | New-AzureRmCdnCustomDomain -HostName $hostName -CustomDomainName $customDomainName
92+
Assert-AreEqual $customDomainName $createdCustomDomain.Name
93+
Assert-AreEqual $hostName $createdCustomDomain.HostName
94+
95+
$customDomain = $endpoint | Get-AzureRmCdnCustomDomain -CustomDomainName $customDomainName
96+
Assert-AreEqual $customDomainName $customDomain.Name
97+
Assert-AreEqual $hostName $customDomain.HostName
98+
99+
$enabled = $customDomain | Enable-AzureRmCdnCustomDomain -PassThru
100+
Assert-True{$enabled}
101+
Assert-ThrowsContains { Enable-AzureRmCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "BadRequest"
102+
103+
Assert-ThrowsContains { Disable-AzureRmCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "BadRequest"
104+
105+
Remove-AzureRmResourceGroup -Name $resourceGroup.ResourceGroupName -Force
106+
}
107+
108+
62109
<#
63110
.SYNOPSIS
64111
Gets and removes custom domain with stopped endpoint
65112
#>
66113
function Test-CustomDomainGetRemoveWithStoppedEndpoint
67114
{
68-
# Hard-coding host and endpoint names due to requirement for DNS CNAME
69-
$endpointName = "sdktest-cbc4e6fa-da15-4f37-9511-6b7df122c1de"
70-
$hostName = "sdktest-34a59412-9044-4166-b055-d777e111e810.azureedge-test.net"
115+
# Hard-coding host and endpoint names due to requirement for DNS CNAME
116+
$endpointName = "testAkamaiEP"
117+
$hostName = "testAkamai.dustydog.us"
71118

72119
$customDomainName = getAssetName
73120

74121
$profileName = getAssetName
75122
$resourceGroup = TestSetup-CreateResourceGroup
76123
$resourceLocation = "EastUS"
77-
$profileSku = "Standard_Verizon"
124+
$profileSku = "Standard_Akamai"
78125
$tags = @{"tag1" = "value1"; "tag2" = "value2"}
79126
$createdProfile = New-AzureRmCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku -Tag $tags
80127

src/ResourceManager/Cdn/Commands.Cdn.Test/ScenarioTests/EndpointTests.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public EndpointTests(Xunit.Abstractions.ITestOutputHelper output)
2727
_logger = new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output);
2828
ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(_logger);
2929
}
30-
30+
3131
[Fact]
3232
[Trait(Category.AcceptanceType, Category.CheckIn)]
3333
public void TestEndpointCrudAndAction()
@@ -49,6 +49,13 @@ public void TestEndpointCrudAndActionWithAllProperties()
4949
TestController.NewInstance.RunPowerShellTest(_logger, "Test-EndpointCrudAndActionWithAllProperties");
5050
}
5151

52+
[Fact]
53+
[Trait(Category.AcceptanceType, Category.CheckIn)]
54+
public void TestEndpointCreateWithDsa()
55+
{
56+
TestController.NewInstance.RunPowerShellTest(_logger, "Test-EndpointCreateWithDSA");
57+
}
58+
5259
[Fact]
5360
[Trait(Category.AcceptanceType, Category.CheckIn)]
5461
public void TestEndpointCrudAndActionWithAllPropertiesWithPiping()
@@ -76,5 +83,12 @@ public void TestEndpointResourceUsage()
7683
{
7784
TestController.NewInstance.RunPowerShellTest(_logger, "Test-EndpointResourceUsage");
7885
}
86+
87+
[Fact]
88+
[Trait(Category.AcceptanceType, Category.CheckIn)]
89+
public void EndpointValidateProbeUrl()
90+
{
91+
TestController.NewInstance.RunPowerShellTest(_logger, "Test-EndpointValidateProbeUrl");
92+
}
7993
}
8094
}

0 commit comments

Comments
 (0)