Skip to content

Commit

Permalink
fixing regression in Resources Mgr after swagger regeneration/update
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and anudeepsharma committed Feb 23, 2017
1 parent fd5915a commit ddf2f20
Show file tree
Hide file tree
Showing 4 changed files with 337 additions and 286 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ private ServiceResponse<PageImpl<GenericResourceInner>> listByResourceGroupDeleg
* @return the boolean object if successful.
*/
public boolean checkExistence(String resourceGroupName) {
return checkExistenceWithServiceResponseAsync(resourceGroupName).toBlocking().single().body();
Boolean result = checkExistenceWithServiceResponseAsync(resourceGroupName).toBlocking().single().body();
return (result != null) ? result.booleanValue() : false;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,8 @@ private ServiceResponse<GenericResourceInner> getDelegate(Response<ResponseBody>
* @return the boolean object if successful.
*/
public boolean checkExistenceById(String resourceId, String apiVersion) {
return checkExistenceByIdWithServiceResponseAsync(resourceId, apiVersion).toBlocking().single().body();
Boolean result = checkExistenceByIdWithServiceResponseAsync(resourceId, apiVersion).toBlocking().single().body();
return (result != null) ? result.booleanValue() : false;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ public void canCreateUpdateMoveResource() throws Exception {
// Delete
genericResources.deleteById(resource.id());
Assert.assertFalse(genericResources.checkExistence(newRgName, resource.resourceProviderNamespace(), resource.parentResourcePath(), resource.resourceType(), resource.name(), resource.apiVersion()));
Assert.assertFalse(genericResources.checkExistenceById(resource.id()));
}
}

Large diffs are not rendered by default.

0 comments on commit ddf2f20

Please sign in to comment.