File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed
src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -50,5 +50,12 @@ public void TestManagedCacheNamedCacheDoNotExists()
50
50
{
51
51
this . RunPowerShellTest ( "Test-ManagedCacheNamedCacheDoNotExists" ) ;
52
52
}
53
+
54
+ [ Fact ]
55
+ [ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
56
+ public void TestRetirementWarningMessage ( )
57
+ {
58
+ this . RunPowerShellTest ( "Test-RetirementWarningMessage" ) ;
59
+ }
53
60
}
54
61
}
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ function Test-ListLocationsSupportCaching
54
54
{
55
55
$allLocations = Get-AzureManagedCacheLocation
56
56
57
- Assert-AreNotEqual 0 $allLocations.Count
57
+ Assert-AreNotEqual 0 $allLocations.Count
58
58
59
59
$found = $FALSE
60
60
foreach ($location in $allLocations )
@@ -68,6 +68,30 @@ function Test-ListLocationsSupportCaching
68
68
Assert-True {$found }
69
69
}
70
70
71
+
72
+ # ######################### Cache Retirement Warning message test #############################
73
+ <#
74
+ . SYNOPSIS
75
+ List locations that support managed caching service
76
+ #>
77
+ function Test-RetirementWarningMessage
78
+ {
79
+ $datetime = Get-Date
80
+ $datetime.ToUniversalTime ()
81
+ $cacheRetired = $datetime -gt " 2016-12-01 00:00:00Z"
82
+ $allLocations = Get-AzureManagedCacheLocation
83
+ $warningText = " "
84
+ if ($cacheRetired )
85
+ {
86
+ $warningText = " The Azure Managed Cache Service has been retired as of"
87
+ }
88
+ else
89
+ {
90
+ $warningText = " The Azure Managed Cache Service will be retired on"
91
+ }
92
+ Assert-ThrowsContains {Get-AzureManagedCacheLocation } $warningText
93
+ }
94
+
71
95
# ######################### Managed Cache (Named cache) Scenario Tests #############################
72
96
<#
73
97
. SYNOPSIS
You can’t perform that action at this time.
0 commit comments