Skip to content

Commit

Permalink
minor change to test code
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft committed Jan 17, 2022
1 parent bd43ef2 commit 1f611e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.azure.resourcemanager.compute.models.VirtualMachine;
import com.azure.resourcemanager.authorization.models.BuiltInRole;
import com.azure.resourcemanager.authorization.models.RoleAssignment;
import com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes;
import com.azure.resourcemanager.msi.models.Identity;
import com.azure.resourcemanager.network.models.Network;
import com.azure.resourcemanager.resources.models.ResourceGroup;
Expand All @@ -22,7 +23,7 @@

public class VirtualMachineEMSILMSIOperationsTests extends ComputeManagementTest {
private String rgName = "";
private Region region = Region.fromName("West Central US");
private Region region = Region.US_WEST_CENTRAL;
private final String vmName = "javavm";

@Override
Expand Down Expand Up @@ -88,6 +89,7 @@ public void canCreateUpdateVirtualMachineWithEMSI() {
.withSsh(sshPublicKey())
.withExistingUserAssignedManagedServiceIdentity(createdIdentity)
.withNewUserAssignedManagedServiceIdentity(creatableIdentity)
.withSize(VirtualMachineSizeTypes.STANDARD_A0)
.create();

Assertions.assertNotNull(virtualMachine);
Expand Down Expand Up @@ -298,6 +300,7 @@ public void canCreateVirtualMachineWithLMSIAndEMSI() {
.withSystemAssignedManagedServiceIdentity()
.withSystemAssignedIdentityBasedAccessTo(network.id(), BuiltInRole.CONTRIBUTOR)
.withNewUserAssignedManagedServiceIdentity(creatableIdentity)
.withSize(VirtualMachineSizeTypes.STANDARD_A0)
.create();

Assertions.assertNotNull(virtualMachine);
Expand Down Expand Up @@ -398,6 +401,7 @@ public void canUpdateVirtualMachineWithEMSIAndLMSI() throws Exception {
.withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS)
.withRootUsername("Foo12")
.withSsh(sshPublicKey())
.withSize(VirtualMachineSizeTypes.STANDARD_A0)
.create();

// Prepare a definition for yet-to-be-created "User Assigned (External) MSI" with contributor access to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public class VirtualMachineScaleSetEMSILMSIOperationsTests extends ComputeManagementTest {
private String rgName = "";
private Region region = Region.fromName("West Central US");
private Region region = Region.US_WEST_CENTRAL;
private final String vmssName = "javavmss";

@Override
Expand Down

0 comments on commit 1f611e2

Please sign in to comment.