Skip to content

Commit

Permalink
Merge pull request #4162 from dsgouda/test
Browse files Browse the repository at this point in the history
Re-recording tests and fixes
  • Loading branch information
dsgouda authored Mar 26, 2018
2 parents 0602d5a + ba9ad32 commit 0ba651c
Show file tree
Hide file tree
Showing 2 changed files with 1,363 additions and 790 deletions.
25 changes: 12 additions & 13 deletions src/SdkCommon/Test/ClientRuntime.E2E.Tests/ScenarioTests/VMTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ public void UpdateVM_DoNotSerializeProtected()
string resourceGroupName = string.Format("{0}-{1}-{2}", prefix, resourcePrefix, guidString);
string storageName = string.Format("{0}{1}{2}", prefix, storagePrefix, guidString);
string vmName = string.Format("{0}-{1}-{2}", prefix, vmPrefix, guidString);

VirtualMachine vm1;
ResourceGroup resGroup = null;
ResourceGroup resGroup = null;
//string executingAssemblyPath = typeof(Microsoft.Rest.ClientRuntime.E2E.Tests.ScenarioTests.VMTests).GetTypeInfo().Assembly.Location;
//HttpMockServer.RecordsDirectory = Path.Combine(Path.GetDirectoryName(executingAssemblyPath), "SessionRecords");

try
using (base.MockContext = MockContext.Start(this.GetType().FullName))
{
using (base.MockContext = MockContext.Start(this.GetType().FullName))
try
{
//Type.GetType("System.Int32").GetTypeInfo().Assembly.Location
string newVmId = "5C6F1669-C183-4BFC-9BBB-138E0892E917";
Expand Down Expand Up @@ -81,15 +80,15 @@ public void UpdateVM_DoNotSerializeProtected()
// Verify the vmPutResponse does not contain updated VmId
Assert.NotEqual(newVmId, getVm.VmId);
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.ToString());
throw;
}
finally
{
ResourceClient.ResourceGroups.Delete(resGroup.Name);
catch (Exception ex)
{
Debug.WriteLine(ex.ToString());
throw;
}
finally
{
ResourceClient.ResourceGroups.Delete(resGroup.Name);
}
}
}
}
Expand Down
Loading

0 comments on commit 0ba651c

Please sign in to comment.