Skip to content

Commit 2f2718d

Browse files
authored
Merge pull request Azure#5007 from Jinhuafei/acr_dec_release
ACR Dec release
2 parents d004c02 + e1c7139 commit 2f2718d

File tree

59 files changed

+157447
-18037
lines changed

Some content is hidden

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

59 files changed

+157447
-18037
lines changed

src/ResourceManager/ContainerRegistry/AzureRM.ContainerRegistry.psd1

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.3.0'
15+
ModuleVersion = '1.0.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -80,7 +80,16 @@ CmdletsToExport = 'New-AzureRmContainerRegistry', 'Get-AzureRmContainerRegistry'
8080
'Remove-AzureRmContainerRegistry',
8181
'Get-AzureRmContainerRegistryCredential',
8282
'Update-AzureRmContainerRegistryCredential',
83-
'Test-AzureRmContainerRegistryNameAvailability'
83+
'Test-AzureRmContainerRegistryNameAvailability',
84+
'Get-AzureRmContainerRegistryReplication',
85+
'New-AzureRmContainerRegistryReplication',
86+
'Remove-AzureRmContainerRegistryReplication',
87+
'New-AzureRmContainerRegistryWebhook',
88+
'Get-AzureRmContainerRegistryWebhook',
89+
'Update-AzureRmContainerRegistryWebhook',
90+
'Test-AzureRmContainerRegistryWebhook',
91+
'Remove-AzureRmContainerRegistryWebhook',
92+
'Get-AzureRmContainerRegistryWebhookEvent'
8493

8594
# Variables to export from this module
8695
# VariablesToExport = @()

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry.Test/Commands.ContainerRegistry.Test.csproj

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@
5252
<Reference Include="Microsoft.Azure.Common.NetFramework">
5353
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
5454
</Reference>
55-
<Reference Include="Microsoft.Azure.Management.ContainerRegistry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
56-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ContainerRegistry.1.2.0-preview\lib\net45\Microsoft.Azure.Management.ContainerRegistry.dll</HintPath>
57-
<Private>True</Private>
55+
<Reference Include="Microsoft.Azure.Management.ContainerRegistry, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
56+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ContainerRegistry.2.0.0\lib\net452\Microsoft.Azure.Management.ContainerRegistry.dll</HintPath>
5857
</Reference>
5958
<Reference Include="Microsoft.Azure.Management.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6059
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ResourceManager.1.6.0-preview\lib\net452\Microsoft.Azure.Management.ResourceManager.dll</HintPath>
@@ -80,18 +79,16 @@
8079
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
8180
</Reference>
8281
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
83-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
82+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.10\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
8483
</Reference>
8584
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
86-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.7\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
85+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.10\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
8786
</Reference>
8887
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
89-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.12\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
90-
<Private>True</Private>
88+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.3.0\lib\net452\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
9189
</Reference>
92-
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
93-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.6.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
94-
<Private>True</Private>
90+
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
91+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.7.2\lib\net452\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
9592
</Reference>
9693
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
9794
<SpecificVersion>False</SpecificVersion>
@@ -203,6 +200,12 @@
203200
<None Include="SessionRecords\Microsoft.Azure.Commands.ContainerRegistry.Test.ScenarioTests.ContainerRegistryTests\TestAzureContainerRegistryNameAvailability.json">
204201
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
205202
</None>
203+
<None Include="SessionRecords\Microsoft.Azure.Commands.ContainerRegistry.Test.ScenarioTests.ContainerRegistryTests\TestAzureContainerRegistryReplication.json">
204+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
205+
</None>
206+
<None Include="SessionRecords\Microsoft.Azure.Commands.ContainerRegistry.Test.ScenarioTests.ContainerRegistryTests\TestAzureContainerRegistryWebhook.json">
207+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
208+
</None>
206209
</ItemGroup>
207210
<ItemGroup>
208211
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry.Test/ScenarioTests/Common.ps1

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Gets container registry name
1818
#>
1919
function Get-RandomRegistryName
2020
{
21-
return getAssetName
21+
return 'reg' + (getAssetName)
2222
}
2323

2424
<#
@@ -27,7 +27,25 @@ Gets resource group name
2727
#>
2828
function Get-RandomResourceGroupName
2929
{
30-
return getAssetName
30+
return 'rg' + (getAssetName)
31+
}
32+
33+
<#
34+
.SYNOPSIS
35+
Gets webhook name
36+
#>
37+
function Get-RandomReplicationName
38+
{
39+
return 'rep' + (getAssetName)
40+
}
41+
42+
<#
43+
.SYNOPSIS
44+
Gets webhook name
45+
#>
46+
function Get-RandomWebhookName
47+
{
48+
return 'wh' + (getAssetName)
3149
}
3250

3351
<#
@@ -58,3 +76,31 @@ function Get-ProviderLocation($provider)
5876

5977
return "West US"
6078
}
79+
80+
function Assert-Error
81+
{
82+
param([ScriptBlock] $script, [string] $message)
83+
84+
$originalErrorCount = $error.Count
85+
$originalErrorActionPreference = $ErrorActionPreference
86+
$ErrorActionPreference = "SilentlyContinue"
87+
try
88+
{
89+
&$script
90+
}
91+
finally
92+
{
93+
$ErrorActionPreference = $originalErrorActionPreference
94+
}
95+
96+
$result = $Error[0] -like "*$($message)*"
97+
98+
If(!$result)
99+
{
100+
Write-Output "expected error $($message), actual error $($Error[0])"
101+
}
102+
103+
Assert-True {$result}
104+
105+
$Error.Clear()
106+
}

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry.Test/ScenarioTests/ContainerRegistryTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,19 @@ public void TestAzureContainerRegistryNameAvailability()
4949
{
5050
TestController.NewInstance.RunPowerShellTest("Test-AzureContainerRegistryNameAvailability");
5151
}
52+
53+
[Fact]
54+
[Trait(Category.AcceptanceType, Category.CheckIn)]
55+
public void TestAzureContainerRegistryReplication()
56+
{
57+
TestController.NewInstance.RunPowerShellTest("Test-AzureContainerRegistryReplication");
58+
}
59+
60+
[Fact]
61+
[Trait(Category.AcceptanceType, Category.CheckIn)]
62+
public void TestAzureContainerRegistryWebhook()
63+
{
64+
TestController.NewInstance.RunPowerShellTest("Test-AzureContainerRegistryWebhook");
65+
}
5266
}
5367
}

0 commit comments

Comments
 (0)