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
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,24 @@ public void CreateServerWithGatewayTest()

Assert.Equal(listGatewayStatus.Status, Status.Live);

// Dissociate gateway.
client.Servers.DissociateGateway(AnalysisServicesTestUtilities.DefaultResourceGroup, AnalysisServicesTestUtilities.DefaultServerName);

// List gateway status again.
try
{
listGatewayStatus = client.Servers.ListGatewayStatus(AnalysisServicesTestUtilities.DefaultResourceGroup,
AnalysisServicesTestUtilities.DefaultServerName);
}
catch (GatewayListStatusErrorException gatewayException)
{
Assert.Equal(HttpStatusCode.BadRequest, gatewayException.Response.StatusCode);
var errorResponse = gatewayException.Body.Error;
var expectedMessage = string.Format("A unified gateway is not associated with server {0}.", AnalysisServicesTestUtilities.DefaultServerName);
Assert.Equal("GatewayNotAssociated", errorResponse.Code);
Assert.Equal(expectedMessage, errorResponse.Message);
}

// delete the server with its old name, which should also succeed.
client.Servers.Delete(AnalysisServicesTestUtilities.DefaultResourceGroup, AnalysisServicesTestUtilities.DefaultServerName);

Expand Down
Loading