@@ -83,9 +83,11 @@ public void Initialize()
83
83
public void AzureDiskTest ( )
84
84
{
85
85
StartTest ( MethodBase . GetCurrentMethod ( ) . Name , testStartTime ) ;
86
- string blobName = "os0.vhd" ;
86
+
87
87
vhdName = Utilities . GetUniqueShortName ( "os0vhd" ) ;
88
- string mediaLocation = String . Format ( "{0}{1}/{2}" , blobUrlRoot , vhdContainerName , blobName ) ;
88
+ CopyCommonVhd ( vhdContainerName , "os0.vhd" , vhdName ) ;
89
+
90
+ string mediaLocation = String . Format ( "{0}{1}/{2}" , blobUrlRoot , vhdContainerName , vhdName ) ;
89
91
90
92
try
91
93
{
@@ -114,7 +116,7 @@ public void AzureDiskTest()
114
116
Console . WriteLine ( "Disk Label is successfully updated" ) ;
115
117
116
118
// Update only size
117
- int newSize = 250 ;
119
+ int newSize = 50 ;
118
120
vmPowershellCmdlets . UpdateAzureDisk ( vhdName , null , newSize ) ;
119
121
120
122
virtualDisk = vmPowershellCmdlets . GetAzureDisk ( vhdName ) [ 0 ] ;
@@ -126,7 +128,7 @@ public void AzureDiskTest()
126
128
127
129
// Update both label and size
128
130
newLabel = "NewLabel2" ;
129
- newSize = 300 ;
131
+ newSize = 100 ;
130
132
vmPowershellCmdlets . UpdateAzureDisk ( vhdName , newLabel , newSize ) ;
131
133
132
134
virtualDisk = vmPowershellCmdlets . GetAzureDisk ( vhdName ) [ 0 ] ;
@@ -136,7 +138,7 @@ public void AzureDiskTest()
136
138
Assert . AreEqual ( newSize , virtualDisk . DiskSizeInGB ) ;
137
139
Console . WriteLine ( "Both disk label and size are successfully updated" ) ;
138
140
139
- vmPowershellCmdlets . RemoveAzureDisk ( vhdName , false ) ;
141
+ vmPowershellCmdlets . RemoveAzureDisk ( vhdName , true ) ;
140
142
Assert . IsTrue ( Utilities . CheckRemove ( vmPowershellCmdlets . GetAzureDisk , vhdName ) , "The disk was not removed" ) ;
141
143
pass = true ;
142
144
}
@@ -151,7 +153,7 @@ public void AzureDiskTest()
151
153
152
154
try
153
155
{
154
- vmPowershellCmdlets . RemoveAzureDisk ( vhdName , false ) ;
156
+ vmPowershellCmdlets . RemoveAzureDisk ( vhdName , true ) ;
155
157
}
156
158
catch ( Exception cleanupError )
157
159
{
0 commit comments