Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adding support for new Chile and Brazil regions
  • Loading branch information
kjacobsen committed Mar 11, 2019
1 parent dd4b33e commit c9bccdf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
12 changes: 9 additions & 3 deletions functions/Get-MicrosoftAzureDatacenterIPRange.ps1
Expand Up @@ -92,9 +92,12 @@ function Get-MicrosoftAzureDatacenterIPRange
'West India',
'West US 2',
'West US',
'North Europe 2', #Placeholder until azure region name is confirmed
'East Europe', #Placeholder until azure region name is confirmed
'Korea South 2' #Placeholder until azure region name is confirmed
'North Europe 2', #Placeholder until azure region name is confirmed
'East Europe', #Placeholder until azure region name is confirmed
'Korea South 2', #Placeholder until azure region name is confirmed
'Brazil Southeast', #Placeholder until azure region name is confirmed
'Brazil Northeast', #Placeholder until azure region name is confirmed
'Chile Central' #Placeholder until azure region name is confirmed
)]
[ValidateNotNullOrEmpty()]
[String[]]
Expand Down Expand Up @@ -178,6 +181,9 @@ function Get-MicrosoftAzureDatacenterIPRange
'North Europe 2' = 'europenorth2' #Placeholder until azure region name is confirmed
'East Europe' = 'europeeast' #Placeholder until azure region name is confirmed
'Korea South 2' = 'koreas2' #Placeholder until azure region name is confirmed
'Brazil Southeast' = 'brazilse' #Placeholder until azure region name is confirmed
'Brazil Northeast' = 'brazilne' #Placeholder until azure region name is confirmed
'Chile Central' = 'chilec' #Placeholder until azure region name is confirmed
}
}

Expand Down
19 changes: 18 additions & 1 deletion tests/AzurePublicIPAddresses.Tests.ps1
@@ -1,6 +1,5 @@
Import-Module $PSScriptRoot\..\AzurePublicIPAddresses.psm1 -Force


Describe 'AzurePublicIPAddresses' {
Context 'Get-MicrosoftAzureDatacenterIPRange Parameter validation' {
It 'throws an error for an invalid region is specified' {
Expand Down Expand Up @@ -226,6 +225,24 @@ Describe 'AzurePublicIPAddresses' {
}
#>

<# As there are no IP addresses, so disable these tests.
It 'returns output for Korea South 2' {
Get-MicrosoftAzureDatacenterIPRange -AzureRegion 'Brazil Southeast' | Should not be $null
}
#>

<# As there are no IP addresses, so disable these tests.
It 'returns output for Korea South 2' {
Get-MicrosoftAzureDatacenterIPRange -AzureRegion 'Brazil Northeast' | Should not be $null
}
#>

<# As there are no IP addresses, so disable these tests.
It 'returns output for Korea South 2' {
Get-MicrosoftAzureDatacenterIPRange -AzureRegion 'Chile Central' | Should not be $null
}
#>

It 'accepts an Azure region from the pipeline' {
{'West US 2' | Get-MicrosoftAzureDatacenterIPRange} | Should not be $null
}
Expand Down

0 comments on commit c9bccdf

Please sign in to comment.