Skip to content

Commit

Permalink
Merge pull request #149 from huangpf/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
huangpf committed Feb 24, 2016
2 parents 30b460c + 05995b7 commit 1975b4d
Show file tree
Hide file tree
Showing 7 changed files with 1,341 additions and 239 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Microsoft.Azure.Commands.Profile.Test
{
public class ProfileModuleTests
{
[Fact]
[Fact(Skip="Removed flaky test from CI.")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void WarningOnIncompatibleVersions()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,25 @@
# limitations under the License.
# ----------------------------------------------------------------------------------

function Verify-TestRepoDeleted
{
$createdRepo = Get-PSRepository -Name "ProfileModuleTest" -ErrorAction Ignore
if($createdRepo)
{
Unregister-PSRepository -Name "ProfileModuleTest"
}
}

<#
.SYNOPSIS
Tests warning gets printed on incompatible modules with profile
#>
function Test-LoadProfileModule
{
$testPassed = $false
# Clean environment
Verify-TestRepoDeleted

# Push current profile module
Get-PackageProvider -Name NuGet -ForceBootstrap
$global:pushedProfileModule = $(Get-Module AzureRM.Profile).Path
Expand All @@ -29,15 +42,17 @@ function Test-LoadProfileModule
$global:buffer = Import-Module $global:pushedProfileModule 2>&1 3>&1 | Out-String
Write-Warning $global:buffer
Assert-True { $global:buffer -Like "*AzureRM.ApiManagement 998.9.8 is not compatible with AzureRM.Profile*" }
$testPassed = $true
} catch [system.exception] {
Write-Error $_ -ErrorAction Continue
Write-Error $_
} finally {
Uninstall-Module AzureRM.ApiManagement -ErrorAction Ignore
Uninstall-Module AzureRM.Profile -ErrorAction Ignore
}
} catch [system.exception] {
Write-Error $_ -ErrorAction Continue
Write-Error $_
} finally {
Unregister-PSRepository -Name "ProfileModuleTest"
Verify-TestRepoDeleted
}
Assert-True { $testPassed -eq $true } "testPassed = $testPassed"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,98 @@
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1: Get all registered resource providers --------------------------</maml:title>
<maml:introduction>
<maml:paragraph>PS C:\&gt;</maml:paragraph>
</maml:introduction>
<dev:code>
PS C:\&gt;Get-AzureRmResourceProvider
</dev:code>
<dev:remarks>
<maml:para>This command gets all the registered resource providers.</maml:para>
<maml:para />
<maml:para />
<maml:para>
</maml:para>
</dev:remarks>
<command:commandLines>
<command:commandLine>
<command:commandText>
<maml:para />
</command:commandText>
</command:commandLine>
</command:commandLines>
</command:example>
<command:example>
<maml:title>-------------------------- Example 2: Get all resource providers, including those not registered --------------------------</maml:title>
<maml:introduction>
<maml:paragraph>PS C:\&gt;</maml:paragraph>
</maml:introduction>
<dev:code>
PS C:\&gt;Get-AzureRmResourceProvider -ListAvailable
</dev:code>
<dev:remarks>
<maml:para>This command gets all the resource providers, including those registered and unregistered.</maml:para>
<maml:para />
<maml:para />
<maml:para>
</maml:para>
</dev:remarks>
<command:commandLines>
<command:commandLine>
<command:commandText>
<maml:para />
</command:commandText>
</command:commandLine>
</command:commandLines>
</command:example>
<command:example>
<maml:title>-------------------------- Example 3: Get details about a particular resource provider --------------------------</maml:title>
<maml:introduction>
<maml:paragraph>PS C:\&gt;</maml:paragraph>
</maml:introduction>
<dev:code>
PS C:\&gt;Get-AzureRmResourceProvider -ProviderNamespace Microsoft.Web
</dev:code>
<dev:remarks>
<maml:para>This command gets details about a particular resource provider, including the resource types and locations available for the resource provider.</maml:para>
<maml:para />
<maml:para />
<maml:para>
</maml:para>
</dev:remarks>
<command:commandLines>
<command:commandLine>
<command:commandText>
<maml:para />
</command:commandText>
</command:commandLine>
</command:commandLines>
</command:example>
<command:example>
<maml:title>-------------------------- Example 4: Get all registered resource providers filtered by a location --------------------------</maml:title>
<maml:introduction>
<maml:paragraph>PS C:\&gt;</maml:paragraph>
</maml:introduction>
<dev:code>
PS C:\&gt;Get-AzureRmResourceProvider -Location westus
</dev:code>
<dev:remarks>
<maml:para>This command gets all the registered resource providers under a location.</maml:para>
<maml:para />
<maml:para />
<maml:para>
</maml:para>
</dev:remarks>
<command:commandLines>
<command:commandLine>
<command:commandText>
<maml:para />
</command:commandText>
</command:commandLine>
</command:commandLines>
</command:example>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
Expand Down Expand Up @@ -6311,6 +6403,29 @@ Resources</dev:code>
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1: Register a resource provider --------------------------</maml:title>
<maml:introduction>
<maml:paragraph>PS C:\&gt;</maml:paragraph>
</maml:introduction>
<dev:code>
PS C:\&gt;Register-AzureRmResourceProvider -ProviderNamespace Microsoft.Web
</dev:code>
<dev:remarks>
<maml:para>This command registers the provider "Microsoft.Web" for the selected subscription.</maml:para>
<maml:para />
<maml:para />
<maml:para>
</maml:para>
</dev:remarks>
<command:commandLines>
<command:commandLine>
<command:commandText>
<maml:para />
</command:commandText>
</command:commandLine>
</command:commandLines>
</command:example>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
Expand Down Expand Up @@ -9657,6 +9772,29 @@ Tags:
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1: Unregister a resource provider --------------------------</maml:title>
<maml:introduction>
<maml:paragraph>PS C:\&gt;</maml:paragraph>
</maml:introduction>
<dev:code>
PS C:\&gt;Unregister-AzureRmResourceProvider -ProviderNamespace Microsoft.Web
</dev:code>
<dev:remarks>
<maml:para>This command unregisters the provider "Microsoft.Web" for the selected subscription.</maml:para>
<maml:para />
<maml:para />
<maml:para>
</maml:para>
</dev:remarks>
<command:commandLines>
<command:commandLine>
<command:commandText>
<maml:para />
</command:commandText>
</command:commandLine>
</command:commandLines>
</command:example>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
Expand Down
1 change: 0 additions & 1 deletion src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@
<Compile Include="ServerCommunicationLink\Cmdlet\GetAzureSqlServerCommunicationLink.cs" />
<Compile Include="ServerCommunicationLink\Cmdlet\NewAzureSqlServerCommunicationLink.cs" />
<Compile Include="ServerCommunicationLink\Cmdlet\RemoveAzureSqlServerCommunicationLink.cs" />
<Compile Include="ServerCommunicationLink\Cmdlet\SetAzureSqlServerCommunicationLink.cs" />
<Compile Include="ServerCommunicationLink\Model\AzureSqlServerCommunicationLinkModel.cs" />
<Compile Include="ServerCommunicationLink\Services\AzureSqlServerCommunicationLinkAdapter.cs" />
<Compile Include="ServerCommunicationLink\Services\AzureSqlServerCommunicationLinkCommunicator.cs" />
Expand Down

This file was deleted.

Loading

0 comments on commit 1975b4d

Please sign in to comment.