Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Added Batch cmdlets
* Start-AzureBatchPoolResize
* Stop-AzureBatchPoolResize
* Added support for scaling in Set-AzureRedisCache, using redisConfiguration instead of maxMemoryPolicy, changes related to ResourceBase, ResourceBaseExtended and ResourceIdentity #513
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we do this like this:

  • RedisCache cmdlets
    • Set-AzureRedisCache - added support for ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


2015.06.05 version 0.9.3
* Fixed bug in Websites cmdlets related to slots #454
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
<Reference Include="Microsoft.Azure.Common.NetFramework">
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Redis">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Redis.0.14.0-preview\lib\net40\Microsoft.Azure.Management.Redis.dll</HintPath>
<Reference Include="Microsoft.Azure.Management.Redis, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Redis.1.0.0-preview\lib\net40\Microsoft.Azure.Management.Redis.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down Expand Up @@ -162,9 +162,6 @@
<None Include="ScenarioTests\RedisCacheTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestCreateExistingRedisCacheTest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestRedisCache.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ public void TestSetNonExistingRedisCacheTest()
RunPowerShellTest("Test-SetNonExistingRedisCacheTest");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestCreateExistingRedisCacheTest()
{
RunPowerShellTest("Test-CreateExistingRedisCacheTest");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRedisCachePipeline()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Test-RedisCache
}

# Updating Cache
$cacheUpdated = Set-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -MaxMemoryPolicy AllKeysLRU -EnableNonSslPort $false
$cacheUpdated = Set-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -RedisConfiguration @{"maxmemory-policy" = "allkeys-lru"} -EnableNonSslPort $true

Assert-AreEqual $cacheName $cacheUpdated.Name
Assert-AreEqual $location $cacheUpdated.Location
Expand All @@ -65,8 +65,8 @@ function Test-RedisCache
Assert-AreEqual "2.8" $cacheUpdated.RedisVersion
Assert-AreEqual "250MB" $cacheUpdated.Size
Assert-AreEqual "Basic" $cacheUpdated.Sku
Assert-AreEqual "AllKeysLRU" $cacheUpdated.MaxMemoryPolicy.Replace("-", "")
Assert-False { $cacheUpdated.EnableNonSslPort }
Assert-AreEqual "allkeys-lru" $cacheUpdated.RedisConfiguration.Item("maxmemory-policy")
Assert-True { $cacheUpdated.EnableNonSslPort }

Assert-NotNull $cacheUpdated.PrimaryKey "PrimaryKey do not exists"
Assert-NotNull $cacheUpdated.SecondaryKey "SecondaryKey do not exists"
Expand Down Expand Up @@ -153,22 +153,6 @@ function Test-SetNonExistingRedisCacheTest
Assert-Throws {Set-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -MaxMemoryPolicy AllKeysLRU}
}

<#
.SYNOPSIS
Tests creating redis cache that already exists.
#>
function Test-CreateExistingRedisCacheTest
{
# Setup
# resource group should exists
$resourceGroupName = "MyResourceGroup"
$cacheName = "myportalcache"
$location = "North Central US"

# Creating Cache
Assert-ThrowsContains {New-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Location $location -Size 250MB -Sku Standard} "already exists"
}

<#
.SYNOPSIS
Tests redis cache.
Expand All @@ -182,7 +166,7 @@ function Test-RedisCachePipeline
$location = "North Central US"

# Creating Cache
$cacheCreated = New-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Location $location -Size 250MB -Sku Basic -EnableNonSslPort $false
$cacheCreated = New-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Location $location -Size 250MB -Sku Basic -EnableNonSslPort $true

Assert-AreEqual $cacheName $cacheCreated.Name
Assert-AreEqual $location $cacheCreated.Location
Expand All @@ -195,7 +179,7 @@ function Test-RedisCachePipeline
Assert-AreEqual "2.8" $cacheCreated.RedisVersion
Assert-AreEqual "250MB" $cacheCreated.Size
Assert-AreEqual "Basic" $cacheCreated.Sku
Assert-False { $cacheCreated.EnableNonSslPort }
Assert-True { $cacheCreated.EnableNonSslPort }

Assert-NotNull $cacheCreated.PrimaryKey "PrimaryKey do not exists"
Assert-NotNull $cacheCreated.SecondaryKey "SecondaryKey do not exists"
Expand Down Expand Up @@ -224,7 +208,7 @@ function Test-RedisCachePipeline
}

# Updating Cache using pipeline
Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName | Set-AzureRedisCache -MaxMemoryPolicy AllKeysRandom -EnableNonSslPort $true
Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName | Set-AzureRedisCache -RedisConfiguration @{"maxmemory-policy" = "allkeys-random"} -EnableNonSslPort $false
$cacheUpdatedPiped = Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName

Assert-AreEqual $cacheName $cacheUpdatedPiped.Name
Expand All @@ -238,8 +222,8 @@ function Test-RedisCachePipeline
Assert-AreEqual "2.8" $cacheUpdatedPiped.RedisVersion
Assert-AreEqual "250MB" $cacheUpdatedPiped.Size
Assert-AreEqual "Basic" $cacheUpdatedPiped.Sku
Assert-AreEqual "AllKeysRandom" $cacheUpdatedPiped.MaxMemoryPolicy.Replace("-", "")
Assert-True { $cacheUpdatedPiped.EnableNonSslPort }
Assert-AreEqual "allkeys-random" $cacheUpdatedPiped.RedisConfiguration.Item("maxmemory-policy")
Assert-False { $cacheUpdatedPiped.EnableNonSslPort }

# Get cache keys
$cacheKeysBeforeUpdate = Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName | Get-AzureRedisCacheKey
Expand Down
Loading