Skip to content

Commit 1975b4d

Browse files
committed
Merge pull request #149 from huangpf/dev
Dev
2 parents 30b460c + 05995b7 commit 1975b4d

File tree

7 files changed

+1341
-239
lines changed

7 files changed

+1341
-239
lines changed

src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Microsoft.Azure.Commands.Profile.Test
2020
{
2121
public class ProfileModuleTests
2222
{
23-
[Fact]
23+
[Fact(Skip="Removed flaky test from CI.")]
2424
[Trait(Category.AcceptanceType, Category.CheckIn)]
2525
public void WarningOnIncompatibleVersions()
2626
{

src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.ps1

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,25 @@
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
1414

15+
function Verify-TestRepoDeleted
16+
{
17+
$createdRepo = Get-PSRepository -Name "ProfileModuleTest" -ErrorAction Ignore
18+
if($createdRepo)
19+
{
20+
Unregister-PSRepository -Name "ProfileModuleTest"
21+
}
22+
}
23+
1524
<#
1625
.SYNOPSIS
1726
Tests warning gets printed on incompatible modules with profile
1827
#>
1928
function Test-LoadProfileModule
2029
{
30+
$testPassed = $false
31+
# Clean environment
32+
Verify-TestRepoDeleted
33+
2134
# Push current profile module
2235
Get-PackageProvider -Name NuGet -ForceBootstrap
2336
$global:pushedProfileModule = $(Get-Module AzureRM.Profile).Path
@@ -29,15 +42,17 @@ function Test-LoadProfileModule
2942
$global:buffer = Import-Module $global:pushedProfileModule 2>&1 3>&1 | Out-String
3043
Write-Warning $global:buffer
3144
Assert-True { $global:buffer -Like "*AzureRM.ApiManagement 998.9.8 is not compatible with AzureRM.Profile*" }
45+
$testPassed = $true
3246
} catch [system.exception] {
33-
Write-Error $_ -ErrorAction Continue
47+
Write-Error $_
3448
} finally {
3549
Uninstall-Module AzureRM.ApiManagement -ErrorAction Ignore
3650
Uninstall-Module AzureRM.Profile -ErrorAction Ignore
3751
}
3852
} catch [system.exception] {
39-
Write-Error $_ -ErrorAction Continue
53+
Write-Error $_
4054
} finally {
41-
Unregister-PSRepository -Name "ProfileModuleTest"
55+
Verify-TestRepoDeleted
4256
}
57+
Assert-True { $testPassed -eq $true } "testPassed = $testPassed"
4358
}

src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,98 @@
10061006
</maml:alert>
10071007
</maml:alertSet>
10081008
<command:examples>
1009+
<command:example>
1010+
<maml:title>-------------------------- Example 1: Get all registered resource providers --------------------------</maml:title>
1011+
<maml:introduction>
1012+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
1013+
</maml:introduction>
1014+
<dev:code>
1015+
PS C:\&gt;Get-AzureRmResourceProvider
1016+
</dev:code>
1017+
<dev:remarks>
1018+
<maml:para>This command gets all the registered resource providers.</maml:para>
1019+
<maml:para />
1020+
<maml:para />
1021+
<maml:para>
1022+
</maml:para>
1023+
</dev:remarks>
1024+
<command:commandLines>
1025+
<command:commandLine>
1026+
<command:commandText>
1027+
<maml:para />
1028+
</command:commandText>
1029+
</command:commandLine>
1030+
</command:commandLines>
1031+
</command:example>
1032+
<command:example>
1033+
<maml:title>-------------------------- Example 2: Get all resource providers, including those not registered --------------------------</maml:title>
1034+
<maml:introduction>
1035+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
1036+
</maml:introduction>
1037+
<dev:code>
1038+
PS C:\&gt;Get-AzureRmResourceProvider -ListAvailable
1039+
</dev:code>
1040+
<dev:remarks>
1041+
<maml:para>This command gets all the resource providers, including those registered and unregistered.</maml:para>
1042+
<maml:para />
1043+
<maml:para />
1044+
<maml:para>
1045+
</maml:para>
1046+
</dev:remarks>
1047+
<command:commandLines>
1048+
<command:commandLine>
1049+
<command:commandText>
1050+
<maml:para />
1051+
</command:commandText>
1052+
</command:commandLine>
1053+
</command:commandLines>
1054+
</command:example>
1055+
<command:example>
1056+
<maml:title>-------------------------- Example 3: Get details about a particular resource provider --------------------------</maml:title>
1057+
<maml:introduction>
1058+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
1059+
</maml:introduction>
1060+
<dev:code>
1061+
PS C:\&gt;Get-AzureRmResourceProvider -ProviderNamespace Microsoft.Web
1062+
</dev:code>
1063+
<dev:remarks>
1064+
<maml:para>This command gets details about a particular resource provider, including the resource types and locations available for the resource provider.</maml:para>
1065+
<maml:para />
1066+
<maml:para />
1067+
<maml:para>
1068+
</maml:para>
1069+
</dev:remarks>
1070+
<command:commandLines>
1071+
<command:commandLine>
1072+
<command:commandText>
1073+
<maml:para />
1074+
</command:commandText>
1075+
</command:commandLine>
1076+
</command:commandLines>
1077+
</command:example>
1078+
<command:example>
1079+
<maml:title>-------------------------- Example 4: Get all registered resource providers filtered by a location --------------------------</maml:title>
1080+
<maml:introduction>
1081+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
1082+
</maml:introduction>
1083+
<dev:code>
1084+
PS C:\&gt;Get-AzureRmResourceProvider -Location westus
1085+
</dev:code>
1086+
<dev:remarks>
1087+
<maml:para>This command gets all the registered resource providers under a location.</maml:para>
1088+
<maml:para />
1089+
<maml:para />
1090+
<maml:para>
1091+
</maml:para>
1092+
</dev:remarks>
1093+
<command:commandLines>
1094+
<command:commandLine>
1095+
<command:commandText>
1096+
<maml:para />
1097+
</command:commandText>
1098+
</command:commandLine>
1099+
</command:commandLines>
1100+
</command:example>
10091101
</command:examples>
10101102
<maml:relatedLinks>
10111103
</maml:relatedLinks>
@@ -6311,6 +6403,29 @@ Resources</dev:code>
63116403
</maml:alert>
63126404
</maml:alertSet>
63136405
<command:examples>
6406+
<command:example>
6407+
<maml:title>-------------------------- Example 1: Register a resource provider --------------------------</maml:title>
6408+
<maml:introduction>
6409+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
6410+
</maml:introduction>
6411+
<dev:code>
6412+
PS C:\&gt;Register-AzureRmResourceProvider -ProviderNamespace Microsoft.Web
6413+
</dev:code>
6414+
<dev:remarks>
6415+
<maml:para>This command registers the provider "Microsoft.Web" for the selected subscription.</maml:para>
6416+
<maml:para />
6417+
<maml:para />
6418+
<maml:para>
6419+
</maml:para>
6420+
</dev:remarks>
6421+
<command:commandLines>
6422+
<command:commandLine>
6423+
<command:commandText>
6424+
<maml:para />
6425+
</command:commandText>
6426+
</command:commandLine>
6427+
</command:commandLines>
6428+
</command:example>
63146429
</command:examples>
63156430
<maml:relatedLinks>
63166431
</maml:relatedLinks>
@@ -9657,6 +9772,29 @@ Tags:
96579772
</maml:alert>
96589773
</maml:alertSet>
96599774
<command:examples>
9775+
<command:example>
9776+
<maml:title>-------------------------- Example 1: Unregister a resource provider --------------------------</maml:title>
9777+
<maml:introduction>
9778+
<maml:paragraph>PS C:\&gt;</maml:paragraph>
9779+
</maml:introduction>
9780+
<dev:code>
9781+
PS C:\&gt;Unregister-AzureRmResourceProvider -ProviderNamespace Microsoft.Web
9782+
</dev:code>
9783+
<dev:remarks>
9784+
<maml:para>This command unregisters the provider "Microsoft.Web" for the selected subscription.</maml:para>
9785+
<maml:para />
9786+
<maml:para />
9787+
<maml:para>
9788+
</maml:para>
9789+
</dev:remarks>
9790+
<command:commandLines>
9791+
<command:commandLine>
9792+
<command:commandText>
9793+
<maml:para />
9794+
</command:commandText>
9795+
</command:commandLine>
9796+
</command:commandLines>
9797+
</command:example>
96609798
</command:examples>
96619799
<maml:relatedLinks>
96629800
</maml:relatedLinks>

src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@
200200
<Compile Include="ServerCommunicationLink\Cmdlet\GetAzureSqlServerCommunicationLink.cs" />
201201
<Compile Include="ServerCommunicationLink\Cmdlet\NewAzureSqlServerCommunicationLink.cs" />
202202
<Compile Include="ServerCommunicationLink\Cmdlet\RemoveAzureSqlServerCommunicationLink.cs" />
203-
<Compile Include="ServerCommunicationLink\Cmdlet\SetAzureSqlServerCommunicationLink.cs" />
204203
<Compile Include="ServerCommunicationLink\Model\AzureSqlServerCommunicationLinkModel.cs" />
205204
<Compile Include="ServerCommunicationLink\Services\AzureSqlServerCommunicationLinkAdapter.cs" />
206205
<Compile Include="ServerCommunicationLink\Services\AzureSqlServerCommunicationLinkCommunicator.cs" />

src/ResourceManager/Sql/Commands.Sql/ServerCommunicationLink/Cmdlet/SetAzureSqlServerCommunicationLink.cs

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

0 commit comments

Comments
 (0)