Skip to content

Commit 93ad952

Browse files
Merge remote-tracking branch 'upstream/master' into removeDatabaseSecureConnectionPolicyCmdlet
2 parents 10c27ad + 455c14e commit 93ad952

File tree

709 files changed

+369146
-260205
lines changed

Some content is hidden

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

709 files changed

+369146
-260205
lines changed

.azure-pipelines/powershell-core.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
variables:
22
WindowsName: windows
3-
WindowsImage: VS2017-Win2016
3+
WindowsImage: vs2017-win2016
44
LinuxName: linux
5-
LinuxImage: Ubuntu-18.04
5+
LinuxImage: ubuntu-18.04
66
MacOSName: macOS
77
MacOSImage: macOS-10.13
88
TestFramework: netcoreapp2.1

.azure-pipelines/util/test-steps.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ steps:
1616
custom: msbuild
1717
arguments: 'build.proj /t:${{ parameters.testTarget }} /p:Configuration=${{ parameters.configuration }};TestFramework=${{ parameters.testFramework }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
1818

19+
- task: PublishTestResults@2
20+
inputs:
21+
testRunner: VSTest
22+
testResultsFiles: '**/*.trx'
23+
1924
- template: publish-artifacts-steps.yml
2025
parameters:
2126
artifactName: test-${{ parameters.osName }}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
## Checklist
88

9-
- [ ] I have read the [_Submitting Changes_](../CONTRIBUTING.md#submitting-changes) section of [`CONTRIBUTING.md`](../CONTRIBUTING.md)
9+
- [ ] I have read the [_Submitting Changes_](../blob/master/CONTRIBUTING.md#submitting-changes) section of [`CONTRIBUTING.md`](../blob/master/CONTRIBUTING.md)
1010
- [ ] The title of the PR is clear and informative
1111
- [ ] The appropriate `ChangeLog.md` file(s) has been updated:
1212
- For any service, the `ChangeLog.md` file can be found at `src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md`
1313
- A snippet outlining the change(s) made in the PR should be written under the `## Upcoming Release` header -- no new version header should be added
14-
- [ ] The PR does not introduce [breaking changes](../documentation/breaking-changes/breaking-changes-definition.md)
14+
- [ ] The PR does not introduce [breaking changes](../blob/master/documentation/breaking-changes/breaking-changes-definition.md)
1515
- [ ] If applicable, the changes made in the PR have proper test coverage
1616
- [ ] For public API changes to cmdlets:
1717
- [ ] a cmdlet design review was approved for the changes in [this repository](https://github.com/Azure/azure-powershell-cmdlet-review-pr) (_Microsoft internal only_)
18-
- [ ] the markdown help files have been regenerated using the commands listed [here](../documentation/development-docs/help-generation.md#updating-all-markdown-files-in-a-module)
18+
- [ ] the markdown help files have been regenerated using the commands listed [here](../blob/master/documentation/development-docs/help-generation.md#updating-all-markdown-files-in-a-module)

src/Cdn/Cdn.Test/Cdn.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Azure.Management.Cdn" Version="4.2.2-preview" />
14+
<PackageReference Include="Microsoft.Azure.Management.Cdn" Version="4.2.4-preview" />
1515
</ItemGroup>
1616

1717
</Project>

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ public void TestEndpointCrudAndAction()
3535
TestController.NewInstance.RunPowerShellTest(_logger, "Test-EndpointCrudAndAction");
3636
}
3737

38+
[Fact]
39+
[Trait(Category.AcceptanceType, Category.CheckIn)]
40+
public void TestEndpointCreateWithRulesEngine()
41+
{
42+
TestController.NewInstance.RunPowerShellTest(_logger, "Test-EndpointCreateWithRulesEngine");
43+
}
44+
3845
[Fact]
3946
[Trait(Category.AcceptanceType, Category.CheckIn)]
4047
public void TestEndpointCrudAndActionWithPiping()

src/Cdn/Cdn.Test/ScenarioTests/EndpointTests.ps1

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,53 @@ function Test-EndpointCrudAndAction
7070
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
7171
}
7272

73+
<#
74+
.SYNOPSIS
75+
Create ENdpoint with RulesEngine config
76+
#>
77+
function Test-EndpointCreateWithRulesEngine
78+
{
79+
$profileName = getAssetName
80+
$resourceGroup = TestSetup-CreateResourceGroup
81+
$resourceLocation = "EastUS"
82+
$profileSku = "Standard_Microsoft"
83+
$createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku
84+
85+
$endpointName = getAssetName
86+
$originName = getAssetName
87+
$originHostName = "www.microsoft.com"
88+
89+
$nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName
90+
Assert-True{$nameAvailability.NameAvailable}
91+
92+
$description = 'Sample delivery policy'
93+
$cond1 = New-AzCdnDeliveryRuleCondition -MatchVariable IsDevice -Operator Equal -MatchValue "Desktop"
94+
$action1 = New-AzCdnDeliveryRuleAction -SourcePattern "/abc" -Destination "/def" -PreservePath
95+
$action2 = New-AzCdnDeliveryRuleAction -QueryStringBehavior ExcludeAll -QueryParameter "abc","def"
96+
$action3 = New-AzCdnDeliveryRuleAction -QueryStringBehavior IncludeAll
97+
$redirect = New-AzCdnDeliveryRuleAction -RedirectType Found -DestinationProtocol MatchRequest
98+
$rule0 = New-AzCdnDeliveryRule -Name "EmptyCondition" -Order 0 -Action $redirect,$action3
99+
$rule1 = New-AzCdnDeliveryRule -Name "Rule1" -Order 1 -Condition $cond1 -Action $action1,$action2
100+
$deliverypolicy = New-AzCdnDeliveryPolicy -Description $description -Rule $rule0,$rule1
101+
102+
$createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName -DeliveryPolicy $deliveryPolicy
103+
Assert-AreEqual $description $createdEndpoint.DeliveryPolicy.Description
104+
Assert-AreEqual $endpointName $createdEndpoint.Name
105+
Assert-AreEqual $deliverypolicy.Count $createdEndpoint.DeliveryPolicy.Count
106+
Assert-AreEqual $profileName $createdEndpoint.ProfileName
107+
Assert-AreEqual $resourceGroup.ResourceGroupName $createdEndpoint.ResourceGroupName
108+
Assert-AreEqual $originName $createdEndpoint.Origins[0].Name
109+
Assert-AreEqual $originHostName $createdEndpoint.Origins[0].HostName
110+
111+
$endpointRemoved = Remove-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -PassThru -Force
112+
Assert-True{$endpointRemoved}
113+
114+
Assert-ThrowsContains { Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "NotFound"
115+
116+
Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force
117+
}
118+
119+
73120
<#
74121
.SYNOPSIS
75122
Endpoint cycle with piping

0 commit comments

Comments
 (0)