Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-recording tests and fixes #4162

Merged
merged 1 commit into from
Mar 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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