-
Notifications
You must be signed in to change notification settings - Fork 4k
Add property State in additional to ProvisioningState #3406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a38b513
89bfbcf
911b1f8
4b4f940
2237e75
749b0cf
534a4c4
a63677b
8ac0726
638f1e3
4f11e50
e86d375
6510e11
06a370a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ function Test-AnalysisServicesServer | |
) | ||
|
||
try | ||
{ | ||
{ | ||
# Creating server | ||
$resourceGroupName = Get-ResourceGroupName | ||
$serverName = Get-AnalysisServicesServerName | ||
|
@@ -22,11 +22,14 @@ function Test-AnalysisServicesServer | |
Assert-AreEqual $location $serverCreated.Location | ||
Assert-AreEqual "Microsoft.AnalysisServices/servers" $serverCreated.Type | ||
Assert-True {$serverCreated.Id -like "*$resourceGroupName*"} | ||
Assert-True {$serverCreated.ServerFullName -ne $null -and $serverCreated.ServerFullName.Contains("*$serverName*")} | ||
Assert-True {$serverCreated.ServerFullName -ne $null -and $serverCreated.ServerFullName.Contains("$serverName")} | ||
|
||
[array]$serverGet = Get-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName | ||
$serverGetItem = $serverGet[0] | ||
|
||
Assert-True {$serverGetItem.ProvisioningState -like "Succeeded"} | ||
Assert-True {$serverGetItem.State -like "Succeeded"} | ||
|
||
Assert-AreEqual $serverName $serverGetItem.Name | ||
Assert-AreEqual $location $serverGetItem.Location | ||
Assert-AreEqual "Microsoft.AnalysisServices/servers" $serverGetItem.Type | ||
|
@@ -36,7 +39,7 @@ function Test-AnalysisServicesServer | |
Assert-True {Test-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName} | ||
# Test it without specifying a resource group | ||
Assert-True {Test-AzureRmAnalysisServicesServer -Name $serverName} | ||
|
||
# Updating server | ||
$tagsToUpdate = @{"TestTag" = "TestUpdate"} | ||
$serverUpdated = Set-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -Tag $tagsToUpdate -PassThru | ||
|
@@ -55,7 +58,7 @@ function Test-AnalysisServicesServer | |
# List all servers in resource group | ||
[array]$serversInResourceGroup = Get-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName | ||
Assert-True {$serversInResourceGroup.Count -ge 1} | ||
|
||
$found = 0 | ||
for ($i = 0; $i -lt $serversInResourceGroup.Count; $i++) | ||
{ | ||
|
@@ -95,13 +98,16 @@ function Test-AnalysisServicesServer | |
Suspend-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName | ||
[array]$serverGet = Get-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName | ||
$serverGetItem = $serverGet[0] | ||
# this is to ensure backward compatibility compatibility. The servie side would make change to differenciate state and provisioningState in future | ||
Assert-True {$serverGetItem.State -like "Paused"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a comment saying that this is to ensure backward compatibility. The breaking server changes will be done after this is released. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
Assert-True {$serverGetItem.ProvisioningState -like "Paused"} | ||
|
||
# Resume Analysis Servicesserver | ||
Resume-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName | ||
[array]$serverGet = Get-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName | ||
$serverGetItem = $serverGet[0] | ||
Assert-True {$serverGetItem.ProvisioningState -like "Succeeded"} | ||
Assert-True {$serverGetItem.State -like "Succeeded"} | ||
|
||
# Delete Analysis Servicesserver | ||
Remove-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -PassThru | ||
|
@@ -124,6 +130,7 @@ Tests Analysis Services server lifecycle Failure scenarios (Create, Update, Get | |
#> | ||
function Test-NegativeAnalysisServicesServer | ||
{ | ||
|
||
param | ||
( | ||
$location = "West US", | ||
|
@@ -193,6 +200,7 @@ function Test-AnalysisServicesServerRestart | |
|
||
$serverCreated = New-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -Location $location -Sku 'S1' -Administrators '[email protected],[email protected]' | ||
Assert-True {$serverCreated.ProvisioningState -like "Succeeded"} | ||
Assert-True {$serverCreated.State -like "Succeeded"} | ||
|
||
$asAzureProfile = Login-AzureAsAccount -RolloutEnvironment $rolloutEnvironment | ||
Assert-NotNull $asAzureProfile "Login-AzureAsAccount $rolloutEnvironment must not return null" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to be more specific about this change. Which cmdlets will be affected, how would the user use the new State property. How is it different than Provinsioning State?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl , I have added more information about this change.
Currently ASPAAS service still return same for both State and ProvisioningState, we could not tell the user the actual different example until service side make change in future.
I already provided the difference in intention