Skip to content

Commit

Permalink
mgmt, authorization migrate test-proxy (#36043)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored Jul 24, 2023
1 parent ceee129 commit ef0fb5a
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 1,505 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-authorization",
"Tag": "java/resourcemanager/azure-resourcemanager-authorization_290e482023"
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void canCRUDApplication() throws Exception {
}

@Test
@DoNotRecord
@DoNotRecord(skipInPlayback = true)
public void canListApplications() {
if (skipInPlayback()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import com.azure.resourcemanager.resources.ResourceManager;
import com.azure.resourcemanager.resources.fluentcore.utils.HttpPipelineProvider;
import com.azure.resourcemanager.resources.fluentcore.utils.ResourceManagerUtils;
import com.azure.resourcemanager.test.ResourceManagerTestBase;
import com.azure.resourcemanager.test.ResourceManagerTestProxyTestBase;
import com.azure.resourcemanager.test.utils.TestDelayProvider;

import java.io.ByteArrayOutputStream;
Expand All @@ -24,7 +24,7 @@
import java.util.List;

/** The base for storage manager tests. */
public abstract class GraphRbacManagementTest extends ResourceManagerTestBase {
public abstract class GraphRbacManagementTest extends ResourceManagerTestProxyTestBase {
protected AuthorizationManager authorizationManager;
protected ResourceManager resourceManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ public void canCRUDRoleAssignment() throws Exception {
Assertions.assertEquals(1, roleAssignments.size());
RoleAssignment roleAssignment1 = roleAssignments.iterator().next();
Assertions.assertEquals(roleAssignment.id(), roleAssignment1.id());
Assertions.assertEquals(roleAssignment.scope(), roleAssignment1.scope());
if (!isPlaybackMode()) {
// subscriptionId redacted
Assertions.assertEquals(roleAssignment.scope(), roleAssignment1.scope());
}
Assertions.assertEquals(roleAssignment.roleDefinitionId(), roleAssignment1.roleDefinitionId());
Assertions.assertEquals(roleAssignment.principalId(), roleAssignment1.principalId());
Assertions.assertEquals("contributor role", roleAssignment1.description());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void canCRUDServicePrincipal() throws Exception {
}

@Test
@DoNotRecord
@DoNotRecord(skipInPlayback = true)
public void canConsumeServicePrincipalPassword() {
if (skipInPlayback()) {
return;
Expand Down

This file was deleted.

Loading

0 comments on commit ef0fb5a

Please sign in to comment.