Skip to content

Commit

Permalink
mgmt, compute migrate test-proxy (#36069)
Browse files Browse the repository at this point in the history
* fix test for deprecated image

* LIVE only for canCopyStartIncrementalSnapshot
  • Loading branch information
weidongxu-microsoft authored Jul 25, 2023
1 parent d589931 commit 68324d4
Show file tree
Hide file tree
Showing 112 changed files with 23 additions and 271,750 deletions.
6 changes: 6 additions & 0 deletions sdk/resourcemanager/azure-resourcemanager-compute/assets.json
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-compute",
"Tag": "java/resourcemanager/azure-resourcemanager-compute_ceadc5e7d6"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.azure.core.management.profile.AzureProfile;
import com.azure.resourcemanager.resources.ResourceManager;
import com.azure.resourcemanager.storage.StorageManager;
import com.azure.resourcemanager.test.ResourceManagerTestBase;
import com.azure.resourcemanager.test.ResourceManagerTestProxyTestBase;
import com.azure.resourcemanager.test.utils.TestDelayProvider;
import com.azure.resourcemanager.test.utils.TestIdentifierProvider;
import com.jcraft.jsch.JSch;
Expand All @@ -39,7 +39,7 @@
import java.util.List;
import org.junit.jupiter.api.Assertions;

public abstract class ComputeManagementTest extends ResourceManagerTestBase {
public abstract class ComputeManagementTest extends ResourceManagerTestProxyTestBase {

protected ResourceManager resourceManager;
protected ComputeManager computeManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.management.Region;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.test.annotation.DoNotRecord;
import com.azure.resourcemanager.compute.models.CreationSourceType;
import com.azure.resourcemanager.compute.models.Disk;
import com.azure.resourcemanager.compute.models.DiskCreateOption;
Expand Down Expand Up @@ -245,6 +246,9 @@ public void canOperateOnManagedDiskFromSnapshot() {
Assertions.assertTrue(fromSnapshotDisk.source().sourceId().equalsIgnoreCase(snapshot.id()));
}

// test-proxy playback
// reactor.core.Exceptions$OverflowException: Could not emit tick 256 due to lack of requests (interval doesn't support small downstream requests that replenish slower than the ticks)
@DoNotRecord(skipInPlayback = true)
@Test
public void canCopyStartIncrementalSnapshot() {
rgName2 = generateRandomResourceName("rg", 15);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ public class VirtualMachinePopularImageTests extends ComputeManagementTest {
private String rgName = "";

@Test
@DoNotRecord
@DoNotRecord(skipInPlayback = true)
public void canCreateAllPopularImageVM() {
if (skipInPlayback()) {
return;
}

rgName = generateRandomResourceName("rg", 10);
List<Mono<VirtualMachine>> vmMonos = new ArrayList<>();
for (KnownWindowsVirtualMachineImage image : KnownWindowsVirtualMachineImage.values()) {
for (KnownWindowsVirtualMachineImage image : Arrays.stream(KnownWindowsVirtualMachineImage.values())
.filter(image -> image != KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2019_DATACENTER_WITH_CONTAINERS_GEN2 && image != KnownWindowsVirtualMachineImage.WINDOWS_SERVER_2019_DATACENTER_WITH_CONTAINERS)
.collect(Collectors.toList())) {
Mono<VirtualMachine> mono = computeManager.virtualMachines()
.define(generateRandomResourceName("vm", 10))
.withRegion(Region.US_SOUTH_CENTRAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected void cleanUpResources() {
}

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

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 68324d4

Please sign in to comment.