Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
<!-- Delete powershell runtime files -->
<PropertyGroup>
<RuntimeDllsIncludeList>Microsoft.Powershell.*.dll,System*.dll,Microsoft.VisualBasic.dll,Microsoft.CSharp.dll,Microsoft.CodeAnalysis.dll,Microsoft.CodeAnalysis.CSharp.dll</RuntimeDllsIncludeList>
<RuntimeDllsExcludeList>System.Security.Cryptography.ProtectedData.dll,System.Configuration.ConfigurationManager.dll,System.Runtime.CompilerServices.Unsafe.dll,System.IO.FileSystem.AccessControl.dll,System.Buffers.dll,System.Text.Encodings.Web.dll,System.CodeDom.dll,System.Management.dll</RuntimeDllsExcludeList>
<RuntimeDllsExcludeList>System.Security.Cryptography.ProtectedData.dll,System.Configuration.ConfigurationManager.dll,System.Runtime.CompilerServices.Unsafe.dll,System.IO.FileSystem.AccessControl.dll,System.Buffers.dll,System.Text.Encodings.Web.dll,System.CodeDom.dll,System.Management.dll,System.Text.Json.dll,System.Threading.Tasks.Extensions.dll</RuntimeDllsExcludeList>
</PropertyGroup>
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Get-ChildItem -Path $(RepoArtifacts)/$(Configuration) -Recurse -Include $(RuntimeDllsIncludeList) -Exclude $(RuntimeDllsExcludeList) | Where-Object {$_.FullName -notlike '*PreloadAssemblies*' -and $_.FullName -notlike '*NetCoreAssemblies*'} | Remove-Item -Force&quot;" />
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Get-ChildItem -Path $(RepoArtifacts)/$(Configuration) -Recurse -Include 'runtimes' | Remove-Item -Recurse -Force&quot;" Condition="'$(CodeSign)' == 'true'" />
Expand Down
2 changes: 1 addition & 1 deletion src/EventGrid/EventGrid.Test/EventGrid.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageReference Include="Microsoft.Azure.Management.EventHub" Version="2.5.0" />
<PackageReference Include="Microsoft.Azure.Management.Relay" Version="2.0.2" />
<PackageReference Include="Microsoft.Azure.Management.ServiceBus" Version="2.1.0" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="14.5.0" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="15.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ public void TestNewAzureStorageAccountBlockBlobStorage()
TestRunner.RunTestScript("Test-NewAzureStorageAccountBlockBlobStorage");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestFailoverAzureStorageAccount()
{
TestRunner.RunTestScript("Test-FailoverAzureStorageAccount");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetAzureStorageAccountGeoReplicationStats()
Expand Down Expand Up @@ -170,6 +177,20 @@ public void TestStorageAccountManagementPolicy()
TestRunner.RunTestScript("Test-StorageAccountManagementPolicy");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewSetAzureStorageAccountGZRS()
{
TestRunner.RunTestScript("Test-NewSetAzureStorageAccount_GZRS");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewSetAzureStorageAccountRAGZRS()
{
TestRunner.RunTestScript("Test-NewSetAzureStorageAccount_RAGZRS");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewSetAzureStorageAccount_LargeFileShare()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,52 @@ function Test-GetAzureStorageLocationUsage
Assert-AreNotEqual 0 $usage.CurrentValue;
}

<#
.SYNOPSIS
Test Invoke-AzStorageAccountFailover
.DESCRIPTION
Smoke[Broken]Test
#>
function Test-FailoverAzureStorageAccount
{
# Setup
$rgname = Get-StorageManagementTestResourceName;

try
{
# Test
$stoname = 'sto' + $rgname;
$stotype = 'Standard_RAGRS';
$kind = 'StorageV2'

$loc = Get-ProviderLocation_Canary ResourceManagement;
New-AzResourceGroup -Name $rgname -Location $loc;

New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype -Kind $kind;
$sto = Get-AzStorageAccount -ResourceGroupName $rgname -Name $stoname;
Assert-AreEqual $stoname $sto.StorageAccountName;
Assert-AreEqual $stotype $sto.Sku.Name;
Assert-AreEqual $loc.ToLower().Replace(" ", "") $sto.Location;
Assert-AreEqual $kind $sto.Kind;
$seconcaryLocation = $sto.SecondaryLocation

#Invoke Failover
$job = Invoke-AzStorageAccountFailover -ResourceGroupName $rgname -Name $stoname -Force -AsJob
$job | Wait-Job

$sto = Get-AzStorageAccount -ResourceGroupName $rgname -Name $stoname;
Assert-AreEqual $seconcaryLocation $sto.PrimaryLocation;
Assert-AreEqual 'Standard_LRS' $sto.Sku.Name;

Retry-IfException { Remove-AzStorageAccount -Force -ResourceGroupName $rgname -Name $stoname; }
}
finally
{
# Cleanup
Clean-ResourceGroup $rgname
}
}

<#
.SYNOPSIS
Test Get-AzStorageAccount with -IncludeGeoReplicationStats
Expand Down Expand Up @@ -1098,6 +1144,102 @@ function Test-StorageAccountManagementPolicy
}
}

<#
.SYNOPSIS
Test Test-NewSetAzureStorageAccount_GZRS
.DESCRIPTION
SmokeTest
#>
function Test-NewSetAzureStorageAccount_GZRS
{
# Setup
$rgname = Get-StorageManagementTestResourceName;

try
{
# Test
$stoname = 'sto' + $rgname;
$stotype = 'Standard_GZRS';
$loc = Get-ProviderLocation_Canary ResourceManagement;
$kind = 'StorageV2'

New-AzResourceGroup -Name $rgname -Location $loc;
Write-Output ("Resource Group created")

New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -SkuName $stotype ;

Retry-IfException { $global:sto = Get-AzStorageAccount -ResourceGroupName $rgname -Name $stoname; }
Assert-AreEqual $stoname $sto.StorageAccountName;
Assert-AreEqual $stotype $sto.Sku.Name;
Assert-AreEqual $loc.ToLower().Replace(" ", "") $sto.Location;
Assert-AreEqual $kind $sto.Kind;

$stotype = 'Standard_RAGZRS';
Set-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -SkuName $stotype ;

Retry-IfException { $global:sto = Get-AzStorageAccount -ResourceGroupName $rgname -Name $stoname; }
Assert-AreEqual $stoname $sto.StorageAccountName;
Assert-AreEqual $stotype $sto.Sku.Name;
Assert-AreEqual $loc.ToLower().Replace(" ", "") $sto.Location;
Assert-AreEqual $kind $sto.Kind;

Remove-AzStorageAccount -Force -ResourceGroupName $rgname -Name $stoname;
}
finally
{
# Cleanup
Clean-ResourceGroup $rgname
}
}

<#
.SYNOPSIS
Test Test-NewAzureStorageAccount_RAGZRS
.DESCRIPTION
SmokeTest
#>
function Test-NewSetAzureStorageAccount_RAGZRS
{
# Setup
$rgname = Get-StorageManagementTestResourceName;

try
{
# Test
$stoname = 'sto' + $rgname;
$stotype = 'Standard_RAGZRS';
$loc = Get-ProviderLocation_Canary ResourceManagement;
$kind = 'StorageV2'

New-AzResourceGroup -Name $rgname -Location $loc;
Write-Output ("Resource Group created")

New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -SkuName $stotype ;

Retry-IfException { $global:sto = Get-AzStorageAccount -ResourceGroupName $rgname -Name $stoname; }
Assert-AreEqual $stoname $sto.StorageAccountName;
Assert-AreEqual $stotype $sto.Sku.Name;
Assert-AreEqual $loc.ToLower().Replace(" ", "") $sto.Location;
Assert-AreEqual $kind $sto.Kind;

$stotype = 'Standard_GZRS';
Set-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -SkuName $stotype ;

Retry-IfException { $global:sto = Get-AzStorageAccount -ResourceGroupName $rgname -Name $stoname; }
Assert-AreEqual $stoname $sto.StorageAccountName;
Assert-AreEqual $stotype $sto.Sku.Name;
Assert-AreEqual $loc.ToLower().Replace(" ", "") $sto.Location;
Assert-AreEqual $kind $sto.Kind;

Remove-AzStorageAccount -Force -ResourceGroupName $rgname -Name $stoname;
}
finally
{
# Cleanup
Clean-ResourceGroup $rgname
}
}

<#
.SYNOPSIS
Test Test-NewSetAzureStorageAccount_LargeFileShare
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ public void TestStorageBlobContainer()
TestController.NewInstance.RunPsTest(_logger, "Test-StorageBlobContainer");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestStorageBlobContainerEncryptionScope()
{
TestController.NewInstance.RunPsTest(_logger, "Test-StorageBlobContainerEncryptionScope");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestStorageBlobContainerLegalHold()
Expand All @@ -57,6 +64,13 @@ public void TestStorageBlobContainerImmutabilityPolicy()
public void TestStorageBlobServiceProperties()
{
TestController.NewInstance.RunPsTest(_logger, "Test-StorageBlobServiceProperties");
}
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestStorageBlobRestore()
{
TestController.NewInstance.RunPsTest(_logger, "Test-StorageBlobRestore");
}
}
}
Loading