diff --git a/AzurePowershell.Test.targets b/AzurePowershell.Test.targets index c7f24c47bbe7..2b624326c503 100644 --- a/AzurePowershell.Test.targets +++ b/AzurePowershell.Test.targets @@ -84,7 +84,7 @@ - + @@ -98,19 +98,37 @@ - - + + - - + + @@ -458,7 +476,7 @@ - + diff --git a/build.proj b/build.proj index 7d5ff416efcb..1de7a0a2ce61 100644 --- a/build.proj +++ b/build.proj @@ -70,7 +70,7 @@ diff --git a/packages.config b/packages.config index acdf0e730003..4e3a43699ecd 100644 --- a/packages.config +++ b/packages.config @@ -1,5 +1,5 @@ - - + + diff --git a/src/Common/Commands.Common/AzureDataCmdlet.cs b/src/Common/Commands.Common/AzureDataCmdlet.cs index 001e11e6b33c..4bba1d50d197 100644 --- a/src/Common/Commands.Common/AzureDataCmdlet.cs +++ b/src/Common/Commands.Common/AzureDataCmdlet.cs @@ -95,7 +95,7 @@ protected override void PromptForDataCollectionProfileIfNotExists() while (!this.Host.UI.RawUI.KeyAvailable && elapsedSeconds < timeToWaitInSeconds) { - Thread.Sleep(TimeSpan.FromMilliseconds(10)); + TestMockSupport.Delay(10*1000); endTime = DateTime.Now; elapsedSeconds = (endTime - startTime).TotalSeconds; diff --git a/src/Common/Commands.Common/AzurePSCmdlet.cs b/src/Common/Commands.Common/AzurePSCmdlet.cs index 6cfddec82999..95c397af2936 100644 --- a/src/Common/Commands.Common/AzurePSCmdlet.cs +++ b/src/Common/Commands.Common/AzurePSCmdlet.cs @@ -265,10 +265,10 @@ protected override void EndProcessing() protected string CurrentPath() { // SessionState is only available within PowerShell so default to - // the CurrentDirectory when being run from tests. + // the TestMockSupport.TestExecutionFolder when being run from tests. return (SessionState != null) ? SessionState.Path.CurrentLocation.Path : - Environment.CurrentDirectory; + TestMockSupport.TestExecutionFolder; } protected bool IsVerbose() diff --git a/src/Common/Commands.Common/TestMockSupport.cs b/src/Common/Commands.Common/TestMockSupport.cs index 5d65a3864fb9..6e2a38c518a9 100644 --- a/src/Common/Commands.Common/TestMockSupport.cs +++ b/src/Common/Commands.Common/TestMockSupport.cs @@ -13,10 +13,13 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using System; namespace Microsoft.WindowsAzure.Commands.Utilities.Common { public class TestMockSupport { + public static string TestExecutionFolder { get; set; } + //a.k.a when you run under Playback mode public static bool RunningMocked { get; set; } @@ -27,5 +30,13 @@ public static void Delay(int milliSeconds) System.Threading.Thread.Sleep(milliSeconds); } } + + public static void Delay(TimeSpan duration) + { + if (!RunningMocked) + { + System.Threading.Thread.Sleep(duration); + } + } } } diff --git a/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj b/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj index 618f841f8a67..c4beb96b1544 100644 --- a/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj +++ b/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -14,7 +15,7 @@ 512 ..\..\ true - 3c43a8cf + 64a73b29 true @@ -57,10 +58,10 @@ ..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -120,12 +121,20 @@ - - ..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/Common/Commands.ScenarioTests.Common/Common.ps1 b/src/Common/Commands.ScenarioTests.Common/Common.ps1 index 8b46ac170973..abb329545e68 100644 --- a/src/Common/Commands.ScenarioTests.Common/Common.ps1 +++ b/src/Common/Commands.ScenarioTests.Common/Common.ps1 @@ -280,7 +280,7 @@ function Wait-Function do { - Start-Sleep -s 5 + Wait-Seconds 5 $current = [DateTime]::Now $diff = $current - $start $result = &$scriptBlock @@ -337,7 +337,7 @@ function Retry-Function $tries = 1; while(( $result -ne $true) -and ($tries -le $maxTries)) { - Start-Sleep -s $interval + Wait-Seconds $interval $result = Invoke-Command -ScriptBlock $scriptBlock -ArgumentList $argument; $tries++; } diff --git a/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs b/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs index 03e16d6c5363..dbbb9ee006a8 100644 --- a/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs +++ b/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs @@ -264,7 +264,7 @@ public void SetupModules(params string[] modules) public virtual Collection RunPowerShellTest(params string[] scripts) { - using (var powershell = System.Management.Automation.PowerShell.Create()) + using (var powershell = System.Management.Automation.PowerShell.Create(RunspaceMode.NewRunspace)) { SetupPowerShellModules(powershell); @@ -302,13 +302,18 @@ public virtual Collection RunPowerShellTest(params string[] scripts) private void SetupPowerShellModules(System.Management.Automation.PowerShell powershell) { - powershell.AddScript(string.Format("cd \"{0}\"", Environment.CurrentDirectory)); + powershell.AddScript("$error.clear()"); + powershell.AddScript(string.Format("cd \"{0}\"", AppDomain.CurrentDomain.BaseDirectory)); foreach (string moduleName in modules) { - powershell.AddScript(string.Format("Import-Module \".\\{0}\"", moduleName)); + powershell.AddScript(string.Format("Import-Module \"{0}\"", + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, moduleName))); } + powershell.AddScript( + string.Format(@"set-location {0}", AppDomain.CurrentDomain.BaseDirectory)); + powershell.AddScript(string.Format(@"$TestOutputRoot='{0}'", AppDomain.CurrentDomain.BaseDirectory)); powershell.AddScript("$VerbosePreference='Continue'"); powershell.AddScript("$DebugPreference='Continue'"); powershell.AddScript("$ErrorActionPreference='Stop'"); diff --git a/src/Common/Commands.ScenarioTests.Common/PowerShellExtensions.cs b/src/Common/Commands.ScenarioTests.Common/PowerShellExtensions.cs index 13250e4c9b24..4037814fc456 100644 --- a/src/Common/Commands.ScenarioTests.Common/PowerShellExtensions.cs +++ b/src/Common/Commands.ScenarioTests.Common/PowerShellExtensions.cs @@ -48,7 +48,7 @@ public static T GetPowerShellVariable(this System.Management.Automation.Power } /// - /// Gets a powershell enumerable collection from the current session and convernts it back to it's original type. + /// Gets a powershell enumerable collection from the current session and converts it back to it's original type. /// /// The powershell object original type /// The PowerShell instance diff --git a/src/Common/Commands.ScenarioTests.Common/Properties/AssemblyInfo.cs b/src/Common/Commands.ScenarioTests.Common/Properties/AssemblyInfo.cs index 98d020782545..c689c9f799bb 100644 --- a/src/Common/Commands.ScenarioTests.Common/Properties/AssemblyInfo.cs +++ b/src/Common/Commands.ScenarioTests.Common/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/Common/Commands.ScenarioTests.Common/SMTestBase.cs b/src/Common/Commands.ScenarioTests.Common/SMTestBase.cs index d0ab6e3b123b..49a3179f5cca 100644 --- a/src/Common/Commands.ScenarioTests.Common/SMTestBase.cs +++ b/src/Common/Commands.ScenarioTests.Common/SMTestBase.cs @@ -30,6 +30,7 @@ public abstract class SMTestBase public SMTestBase() { + System.Environment.CurrentDirectory = AppDomain.CurrentDomain.BaseDirectory; BaseSetup(); } diff --git a/src/Common/Commands.ScenarioTests.Common/packages.config b/src/Common/Commands.ScenarioTests.Common/packages.config index 26d23b0a4e08..17d0c605e03e 100644 --- a/src/Common/Commands.ScenarioTests.Common/packages.config +++ b/src/Common/Commands.ScenarioTests.Common/packages.config @@ -5,8 +5,8 @@ - - + + @@ -16,8 +16,11 @@ - - - - + + + + + + + \ No newline at end of file diff --git a/src/Common/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj b/src/Common/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj index f25bcc06daff..c8726b04d243 100644 --- a/src/Common/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj +++ b/src/Common/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj @@ -1,6 +1,7 @@  - + + Debug AnyCPU @@ -20,8 +21,7 @@ ..\..\..\ true - - + 75466ccb true @@ -55,7 +55,7 @@ True - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -113,6 +113,22 @@ + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True + diff --git a/src/Common/Storage/Commands.Storage.ScenarioTest/Properties/AssemblyInfo.cs b/src/Common/Storage/Commands.Storage.ScenarioTest/Properties/AssemblyInfo.cs index 12aaec94e3f7..78ed89d99af4 100644 --- a/src/Common/Storage/Commands.Storage.ScenarioTest/Properties/AssemblyInfo.cs +++ b/src/Common/Storage/Commands.Storage.ScenarioTest/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -42,4 +43,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.8.5")] -[assembly: AssemblyFileVersion("0.8.5")] \ No newline at end of file +[assembly: AssemblyFileVersion("0.8.5")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] \ No newline at end of file diff --git a/src/Common/Storage/Commands.Storage.ScenarioTest/packages.config b/src/Common/Storage/Commands.Storage.ScenarioTest/packages.config index 27886b862000..d5cf8dcd9ff8 100644 --- a/src/Common/Storage/Commands.Storage.ScenarioTest/packages.config +++ b/src/Common/Storage/Commands.Storage.ScenarioTest/packages.config @@ -2,7 +2,7 @@ - + @@ -14,5 +14,11 @@ - + + + + + + + \ No newline at end of file diff --git a/src/Common/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj b/src/Common/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj index a2406c84a71c..e333c8d2d692 100644 --- a/src/Common/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj +++ b/src/Common/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,8 +16,7 @@ ..\..\..\ true - - + 512fe96c true @@ -83,6 +83,22 @@ + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True + diff --git a/src/Common/Storage/Commands.Storage.StorageTestLib/Properties/AssemblyInfo.cs b/src/Common/Storage/Commands.Storage.StorageTestLib/Properties/AssemblyInfo.cs index fb34ae2056bb..e3af24bbf357 100644 --- a/src/Common/Storage/Commands.Storage.StorageTestLib/Properties/AssemblyInfo.cs +++ b/src/Common/Storage/Commands.Storage.StorageTestLib/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -42,4 +43,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.8.5")] -[assembly: AssemblyFileVersion("0.8.5")] \ No newline at end of file +[assembly: AssemblyFileVersion("0.8.5")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] \ No newline at end of file diff --git a/src/Common/Storage/Commands.Storage.StorageTestLib/packages.config b/src/Common/Storage/Commands.Storage.StorageTestLib/packages.config index 5ad6bdbf37d0..5325adbbf98b 100644 --- a/src/Common/Storage/Commands.Storage.StorageTestLib/packages.config +++ b/src/Common/Storage/Commands.Storage.StorageTestLib/packages.config @@ -8,5 +8,11 @@ - + + + + + + + \ No newline at end of file diff --git a/src/Common/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj b/src/Common/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj index 58c120ec8b32..b2035fe5f5a4 100644 --- a/src/Common/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj +++ b/src/Common/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj @@ -1,6 +1,7 @@  - + + Debug AnyCPU @@ -20,8 +21,7 @@ true ..\..\..\ - - + 4d225d1b true @@ -73,7 +73,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -156,6 +156,22 @@ + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True + diff --git a/src/Common/Storage/Commands.Storage.Test/Properties/AssemblyInfo.cs b/src/Common/Storage/Commands.Storage.Test/Properties/AssemblyInfo.cs index 729955159e99..2a311b300b4d 100644 --- a/src/Common/Storage/Commands.Storage.Test/Properties/AssemblyInfo.cs +++ b/src/Common/Storage/Commands.Storage.Test/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -43,3 +44,4 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] [assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/Common/Storage/Commands.Storage.Test/packages.config b/src/Common/Storage/Commands.Storage.Test/packages.config index 4275b79bf2d5..a7c1e9ddc0d9 100644 --- a/src/Common/Storage/Commands.Storage.Test/packages.config +++ b/src/Common/Storage/Commands.Storage.Test/packages.config @@ -6,7 +6,7 @@ - + @@ -22,5 +22,11 @@ - + + + + + + + diff --git a/src/ResourceManager.ForRefactoringOnly.sln b/src/ResourceManager.ForRefactoringOnly.sln index d1914567a0a7..6f25d1494f02 100644 --- a/src/ResourceManager.ForRefactoringOnly.sln +++ b/src/ResourceManager.ForRefactoringOnly.sln @@ -143,6 +143,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.LogicApp", "Resour EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.LogicApp.Test", "ResourceManager\LogicApp\Commands.LogicApp.Test\Commands.LogicApp.Test.csproj", "{F1F11BB1-592B-45A3-844C-7F8A585AD107}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.AzureStackAdmin", "ResourceManager\AzureStackAdmin\Commands.AzureStackAdmin\Commands.AzureStackAdmin.csproj", "{0B02390C-8AA9-4D99-8AA8-2A9D2D39682F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.AzureStackStorage", "ResourceManager\AzureStackStorage\Commands.AzureStackStorage\Commands.AzureStackStorage.csproj", "{D4CA0CC1-CD0A-4CE2-A40D-2D8A082D8791}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.AzureStackStorage.Test", "ResourceManager\AzureStackStorage\Commands.AzureStackStorage.Tests\Commands.AzureStackStorage.Test.csproj", "{53ED0604-8774-4B46-BB26-6AA5A6327A7C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -413,6 +419,18 @@ Global {F1F11BB1-592B-45A3-844C-7F8A585AD107}.Debug|Any CPU.Build.0 = Debug|Any CPU {F1F11BB1-592B-45A3-844C-7F8A585AD107}.Release|Any CPU.ActiveCfg = Release|Any CPU {F1F11BB1-592B-45A3-844C-7F8A585AD107}.Release|Any CPU.Build.0 = Release|Any CPU + {0B02390C-8AA9-4D99-8AA8-2A9D2D39682F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B02390C-8AA9-4D99-8AA8-2A9D2D39682F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B02390C-8AA9-4D99-8AA8-2A9D2D39682F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B02390C-8AA9-4D99-8AA8-2A9D2D39682F}.Release|Any CPU.Build.0 = Release|Any CPU + {D4CA0CC1-CD0A-4CE2-A40D-2D8A082D8791}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4CA0CC1-CD0A-4CE2-A40D-2D8A082D8791}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4CA0CC1-CD0A-4CE2-A40D-2D8A082D8791}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4CA0CC1-CD0A-4CE2-A40D-2D8A082D8791}.Release|Any CPU.Build.0 = Release|Any CPU + {53ED0604-8774-4B46-BB26-6AA5A6327A7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53ED0604-8774-4B46-BB26-6AA5A6327A7C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53ED0604-8774-4B46-BB26-6AA5A6327A7C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53ED0604-8774-4B46-BB26-6AA5A6327A7C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -447,5 +465,6 @@ Global {E6122DB1-1466-47EE-8BA0-73F9CA90F826} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} {CA5F571B-550B-4BE3-9BA3-06442DF52768} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} {F1F11BB1-592B-45A3-844C-7F8A585AD107} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {53ED0604-8774-4B46-BB26-6AA5A6327A7C} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} EndGlobalSection EndGlobal diff --git a/src/ResourceManager/ApiManagement/.nuget/packages.config b/src/ResourceManager/ApiManagement/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/ApiManagement/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/ApiManagement/ApiManagement.sln b/src/ResourceManager/ApiManagement/ApiManagement.sln index 7844717d3c0c..733aa0b7732b 100644 --- a/src/ResourceManager/ApiManagement/ApiManagement.sln +++ b/src/ResourceManager/ApiManagement/ApiManagement.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +VisualStudioVersion = 12.0.40629.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}" EndProject @@ -34,11 +34,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{DC06858D-05DF-449E-8F69-8B8815864AB1}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj index 72f0cff7a47c..1eb498de04c4 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj @@ -1,5 +1,7 @@  + + Debug @@ -13,7 +15,7 @@ 512 ..\..\..\ true - 39896c3d + 5f258b8c true @@ -69,13 +71,13 @@ False ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - + False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -140,12 +142,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/ApiManagementTests.ps1 b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/ApiManagementTests.ps1 index 52be85f5fe38..5e098a4e90bb 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/ApiManagementTests.ps1 +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/ApiManagementTests.ps1 @@ -361,7 +361,7 @@ Tests ImportApiManagementHostnameCertificate. #> function Test-ImportApiManagementHostnameCertificate { - $certFilePath = ".\testcertificate.pfx"; + $certFilePath = "$TestOutputRoot\testcertificate.pfx"; $certPassword = "powershelltest"; # Setup @@ -448,7 +448,7 @@ Tests SetApiManagementHostnames. #> function Test-SetApiManagementHostnames { - $certFilePath = ".\testcertificate.pfx"; + $certFilePath = "$TestOutputRoot\testcertificate.pfx"; $certPassword = "powershelltest"; $certSubject = "CN=ailn.redmond.corp.microsoft.com" $certThumbprint = "51A702569BADEDB90A75141B070F2D4B5DDFA447" diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config index 05a392db53b4..2dc8bcec3cf9 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config @@ -4,12 +4,12 @@ - + - - + + @@ -21,6 +21,11 @@ - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AzureApiManagementCmdletBase.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AzureApiManagementCmdletBase.cs index 82967c297d1a..ab58e4beff87 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AzureApiManagementCmdletBase.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AzureApiManagementCmdletBase.cs @@ -59,7 +59,7 @@ protected ApiManagementLongRunningOperation WaitForOperationToComplete(ApiManage var retryAfter = longRunningOperation.RetryAfter ?? LongRunningOperationDefaultTimeout; WriteVerboseWithTimestamp(Resources.VerboseGetOperationStateTimeoutMessage, retryAfter); - Thread.Sleep(retryAfter); + TestMockSupport.Delay(retryAfter); longRunningOperation = Client.GetLongRunningOperationStatus(longRunningOperation); WriteProgress(longRunningOperation); diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj index 725df5173b4c..bf82d7f01a3d 100644 --- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj +++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Commands.ApiManagement.ServiceManagement.Test.csproj @@ -1,5 +1,7 @@  + + Debug @@ -13,7 +15,7 @@ 512 ..\..\..\ true - 26d9321c + f6969555 true @@ -71,11 +73,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -139,12 +141,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Properties/AssemblyInfo.cs index 421201341f40..536ba10752b3 100644 --- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -43,3 +44,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.cs b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.cs index 1d0eb9f14e4b..44f30a92c004 100644 --- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.cs +++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.cs @@ -26,17 +26,17 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.Scenario using Microsoft.WindowsAzure.Management.Storage; using Xunit; - public class ApiManagementTests : RMTestBase, IUseFixture + public class ApiManagementTests : RMTestBase, IClassFixture { private readonly EnvironmentSetupHelper _helper; private ApiManagementTestsFixture _fixture; - public ApiManagementTests() + public ApiManagementTests(ApiManagementTestsFixture fixture) { + _fixture = fixture; _helper = new EnvironmentSetupHelper(); } - protected void SetupManagementClients() { var apiManagementManagementClient = GetApiManagementManagementClient(); @@ -184,10 +184,5 @@ private void RunPowerShellTest(params string[] scripts) _helper.RunPowerShellTest(scripts); } } - - public void SetFixture(ApiManagementTestsFixture data) - { - this._fixture = data; - } } } \ No newline at end of file diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.ps1 b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.ps1 index 7170043705a3..4f60dae06c6a 100644 --- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.ps1 +++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.ps1 @@ -1126,7 +1126,7 @@ Param($resourceGroupName, $serviceName) Assert-AreEqual 0 $certificates.Count - $certPath = './Resources/testcertificate.pfx' + $certPath = "$TestOutputRoot\Resources\testcertificate.pfx" $certPassword = 'powershelltest' $certThumbprint = '51A702569BADEDB90A75141B070F2D4B5DDFA447' $certSubject = 'CN=ailn.redmond.corp.microsoft.com' diff --git a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/packages.config b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/packages.config index 182b8a529d75..b1c9545debb6 100644 --- a/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/packages.config +++ b/src/ResourceManager/ApiManagement/Commands.SMAPI.Test/packages.config @@ -4,13 +4,13 @@ - - + + - - + + @@ -22,6 +22,11 @@ - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Automation/.nuget/packages.config b/src/ResourceManager/Automation/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/Automation/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/Automation/Automation.sln b/src/ResourceManager/Automation/Automation.sln index 42bb36b19ca5..32414bfee661 100644 --- a/src/ResourceManager/Automation/Automation.sln +++ b/src/ResourceManager/Automation/Automation.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +VisualStudioVersion = 12.0.40629.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}" EndProject @@ -16,11 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Reso EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{39675CD8-25B7-4BC8-BC88-0E709A01FE91}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj b/src/ResourceManager/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj index ca21200047dc..3f3bf45d50de 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj +++ b/src/ResourceManager/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj @@ -1,6 +1,7 @@  - + + Debug AnyCPU @@ -18,8 +19,7 @@ ..\..\..\ true - - + 63c7c5d2 true @@ -70,13 +70,13 @@ False ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - + False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -133,12 +133,20 @@ ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs index 3aa7667b4209..75e00fa1767e 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs @@ -15,6 +15,7 @@ using System; using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -45,3 +46,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] [assembly: CLSCompliant(false)] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/packages.config b/src/ResourceManager/Automation/Commands.Automation.Test/packages.config index 41fddcbb49d2..e61d719b61b7 100644 --- a/src/ResourceManager/Automation/Commands.Automation.Test/packages.config +++ b/src/ResourceManager/Automation/Commands.Automation.Test/packages.config @@ -5,8 +5,8 @@ - - + + @@ -17,6 +17,11 @@ - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/.nuget/packages.config b/src/ResourceManager/AzureBackup/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/AzureBackup/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/AzureBackup.sln b/src/ResourceManager/AzureBackup/AzureBackup.sln index 286d3db5dec1..d1c207d2c9fe 100644 --- a/src/ResourceManager/AzureBackup/AzureBackup.sln +++ b/src/ResourceManager/AzureBackup/AzureBackup.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +VisualStudioVersion = 12.0.40629.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}" EndProject @@ -16,11 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Prof EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1DB65FD0-8A7B-41EF-BB04-258092D68191}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj index eea0a4012b0a..5a772b6b7d44 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -14,7 +15,7 @@ 512 ..\..\..\ true - baa2b15b + 59694488 true @@ -57,10 +58,10 @@ ..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -117,12 +118,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Properties/AssemblyInfo.cs index 52407357aef0..39527865278d 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Properties/AssemblyInfo.cs @@ -48,3 +48,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTestBase.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTestBase.cs index 893fa0bbed43..325b7ae0a2ee 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTestBase.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupTestBase.cs @@ -165,8 +165,8 @@ public static T GetServiceClient(TestEnvironmentFactory factory, BackupVaultS PropertyInfo property2 = typeof(T).GetProperty("LongRunningOperationRetryTimeout", typeof(int)); if (property1 != (PropertyInfo)null && property2 != (PropertyInfo)null) { - property1.SetValue((object)obj2, (object)0); - property2.SetValue((object)obj2, (object)0); + property1.SetValue((object)obj2, (object)-1); + property2.SetValue((object)obj2, (object)-1); } } return obj2; @@ -205,8 +205,8 @@ public static T GetVaultServiceClient(TestEnvironmentFactory factory, BackupS PropertyInfo property2 = typeof(T).GetProperty("LongRunningOperationRetryTimeout", typeof(int)); if (property1 != (PropertyInfo)null && property2 != (PropertyInfo)null) { - property1.SetValue((object)obj2, (object)0); - property2.SetValue((object)obj2, (object)0); + property1.SetValue((object)obj2, (object)-1); + property2.SetValue((object)obj2, (object)-1); } } return obj2; diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config index 861b8a267f7f..2be57c5b59d0 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config @@ -6,8 +6,8 @@ - - + + @@ -17,7 +17,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletBase.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletBase.cs index fc40b032197d..2b888e17731a 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletBase.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletBase.cs @@ -173,8 +173,7 @@ internal CSMOperationResult TrackOperation(string resourceGroupName, string reso WriteDebug(String.Format(Resources.OperationStatus, response.Status)); break; } - - Thread.Sleep(checkFrequency); + TestMockSupport.Delay(checkFrequency); } return response; diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/WaitAzureRMBackupJob.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/WaitAzureRMBackupJob.cs index fe31e31976bc..4e32988c8f57 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/WaitAzureRMBackupJob.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/WaitAzureRMBackupJob.cs @@ -20,6 +20,7 @@ using Mgmt = Microsoft.Azure.Management.BackupServices.Models; using Microsoft.Azure.Commands.AzureBackup.Models; using Microsoft.Azure.Commands.AzureBackup.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets { @@ -133,7 +134,7 @@ public override void ExecuteCmdlet() break; } - System.Threading.Thread.Sleep(30 * 1000); + TestMockSupport.Delay(30 * 1000); } IList finalJobs = new List(); diff --git a/src/ResourceManager/AzureBatch/.nuget/packages.config b/src/ResourceManager/AzureBatch/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/AzureBatch/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/AzureBatch.sln b/src/ResourceManager/AzureBatch/AzureBatch.sln index 2abab9fa05a2..344a94efde20 100644 --- a/src/ResourceManager/AzureBatch/AzureBatch.sln +++ b/src/ResourceManager/AzureBatch/AzureBatch.sln @@ -22,11 +22,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Co EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{2B087004-8EA2-49CB-A0FF-151CB16B54D6}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs index dbb64ba1046f..9ea903bb7a91 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs @@ -18,6 +18,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.IO; using System.Net; using System.Reflection; using System.Threading.Tasks; @@ -31,8 +32,8 @@ namespace Microsoft.Azure.Commands.Batch.Test /// public static class BatchTestHelpers { - internal const string TestCertificateFileName1 = "Resources\\BatchTestCert01.cer"; - internal const string TestCertificateFileName2 = "Resources\\BatchTestCert02.cer"; + internal static readonly string TestCertificateFileName1 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources\\BatchTestCert01.cer"); + internal static readonly string TestCertificateFileName2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources\\BatchTestCert02.cer"); internal const string TestCertificateAlgorithm = "sha1"; internal const string TestCertificatePassword = "Passw0rd"; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj index 1c23b96e273f..9534e6642241 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\ true - a99b3960 + 41945a72 true @@ -71,11 +72,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -162,12 +163,20 @@ False ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Properties/AssemblyInfo.cs index 01521d1531d7..fdd9fcb12c6e 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Properties/AssemblyInfo.cs @@ -35,3 +35,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config b/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config index 56a29b7c1385..cfdc08ff5d2a 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/packages.config @@ -10,8 +10,8 @@ - - + + @@ -28,7 +28,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/AzureStackStorage/.nuget/packages.config b/src/ResourceManager/AzureStackStorage/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/AzureStackStorage/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/AzureStackStorage/AzureStackStorage.sln b/src/ResourceManager/AzureStackStorage/AzureStackStorage.sln index 531d737e6baa..fd05c633c061 100644 --- a/src/ResourceManager/AzureStackStorage/AzureStackStorage.sln +++ b/src/ResourceManager/AzureStackStorage/AzureStackStorage.sln @@ -24,11 +24,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Rest", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{7865F5ED-E0F3-45CD-87BA-214FE8A27061}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/Commands.AzureStackStorage.Test.csproj b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/Commands.AzureStackStorage.Test.csproj index 52aef5d3932f..da50a0fe7d96 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/Commands.AzureStackStorage.Test.csproj +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/Commands.AzureStackStorage.Test.csproj @@ -1,11 +1,12 @@  - + + Debug AnyCPU - {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B} + {53ED0604-8774-4B46-BB26-6AA5A6327A7C} Library Properties Microsoft.AzureStack.Commands.StorageAdmin.Test @@ -16,7 +17,7 @@ ..\..\..\ true {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - d7bcc31d + 1a4458ba true @@ -64,11 +65,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -129,12 +130,20 @@ False ..\..\..\packages\System.Spatial.5.6.2\lib\net40\System.Spatial.dll - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True @@ -303,4 +312,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/Properties/AssemblyInfo.cs b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/Properties/AssemblyInfo.cs index 409808df0caf..b712d75fb7e9 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -33,3 +34,4 @@ [assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] [assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/packages.config b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/packages.config index 6a7452687e4b..ce325597d4d7 100644 --- a/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/packages.config +++ b/src/ResourceManager/AzureStackStorage/Commands.AzureStackStorage.Tests/packages.config @@ -5,8 +5,8 @@ - - + + @@ -22,7 +22,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Commands.ScenarioTests.ResourceManager.Common.csproj b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Commands.ScenarioTests.ResourceManager.Common.csproj index 1a590c371b92..e1232eeaf97c 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Commands.ScenarioTests.ResourceManager.Common.csproj +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Commands.ScenarioTests.ResourceManager.Common.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -14,7 +15,7 @@ 512 ..\..\ true - 3c43a8cf + e5bda5ba true @@ -58,10 +59,10 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -121,12 +122,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Common.ps1 b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Common.ps1 index 8b46ac170973..abb329545e68 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Common.ps1 +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Common.ps1 @@ -280,7 +280,7 @@ function Wait-Function do { - Start-Sleep -s 5 + Wait-Seconds 5 $current = [DateTime]::Now $diff = $current - $start $result = &$scriptBlock @@ -337,7 +337,7 @@ function Retry-Function $tries = 1; while(( $result -ne $true) -and ($tries -le $maxTries)) { - Start-Sleep -s $interval + Wait-Seconds $interval $result = Invoke-Command -ScriptBlock $scriptBlock -ArgumentList $argument; $tries++; } diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/EnvironmentSetupHelper.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/EnvironmentSetupHelper.cs index 71d7ea8b8e83..7f8997c82a52 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/EnvironmentSetupHelper.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/EnvironmentSetupHelper.cs @@ -303,9 +303,9 @@ public void SetupModules(params string[] modules) public virtual Collection RunPowerShellTest(params string[] scripts) { - using (var powershell = System.Management.Automation.PowerShell.Create()) + using (var powershell = System.Management.Automation.PowerShell.Create(RunspaceMode.NewRunspace)) { - SetupPowerShellModules(powershell); + SetupPowerShellModules(powershell); Collection output = null; for (int i = 0; i < scripts.Length; ++i) @@ -341,15 +341,20 @@ public virtual Collection RunPowerShellTest(params string[] scripts) private void SetupPowerShellModules(System.Management.Automation.PowerShell powershell) { - powershell.AddScript(string.Format("Write-Debug \"current directory: {0}\"", Directory.GetCurrentDirectory())); + powershell.AddScript("$error.clear()"); + powershell.AddScript(string.Format("Write-Debug \"current directory: {0}\"", AppDomain.CurrentDomain.BaseDirectory)); powershell.AddScript(string.Format("Write-Debug \"current executing assembly: {0}\"", Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))); - powershell.AddScript(string.Format("cd \"{0}\"", Directory.GetCurrentDirectory())); + powershell.AddScript(string.Format("cd \"{0}\"", AppDomain.CurrentDomain.BaseDirectory)); foreach (string moduleName in modules) { - powershell.AddScript(string.Format("Import-Module \".\\{0}\"", moduleName)); + powershell.AddScript(string.Format("Import-Module \"{0}\"", + Path.Combine(AppDomain.CurrentDomain.BaseDirectory,moduleName))); } + powershell.AddScript( + string.Format(@"set-location {0}", AppDomain.CurrentDomain.BaseDirectory)); + powershell.AddScript(string.Format(@"$TestOutputRoot='{0}'", AppDomain.CurrentDomain.BaseDirectory)); powershell.AddScript("$VerbosePreference='Continue'"); powershell.AddScript("$DebugPreference='Continue'"); powershell.AddScript("$ErrorActionPreference='Stop'"); diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Properties/AssemblyInfo.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Properties/AssemblyInfo.cs index d11d2de303a7..523fb7d2845d 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/RMTestBase.cs b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/RMTestBase.cs index 24595f0bfcb0..4fed510affcf 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/RMTestBase.cs +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/RMTestBase.cs @@ -21,6 +21,7 @@ using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System.Threading; +using System.IO; namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common { @@ -33,6 +34,7 @@ public abstract class RMTestBase public RMTestBase() { + System.Environment.CurrentDirectory = AppDomain.CurrentDomain.BaseDirectory; BaseSetup(); } diff --git a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/packages.config b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/packages.config index 26d23b0a4e08..17d0c605e03e 100644 --- a/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/packages.config +++ b/src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/packages.config @@ -5,8 +5,8 @@ - - + + @@ -16,8 +16,11 @@ - - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Compute/.nuget/packages.config b/src/ResourceManager/Compute/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/Compute/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj b/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj index fb7009a17fb5..caa4224bbfb4 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj +++ b/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\..\..\ true - 5620997e + 1017a61d true @@ -83,7 +84,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.4.0-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll @@ -152,12 +153,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs b/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs index e3cabc672588..f9359ebd4aff 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs +++ b/src/ResourceManager/Compute/Commands.Compute.Test/Common/ComputeTestController.cs @@ -30,6 +30,7 @@ using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using RestTestFramework = Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System.IO; namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests { @@ -102,6 +103,7 @@ public void RunPsTestWorkflow( d.Add("Microsoft.Authorization", null); HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(false, d); + HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); using (RestTestFramework.MockContext context = RestTestFramework.MockContext.Start(callingClassType, mockName)) { this.csmTestFactory = new CSMTestEnvironmentFactory(); diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Compute/Commands.Compute.Test/Properties/AssemblyInfo.cs index 4e3aadc992b0..b2f67c581cde 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Compute/Commands.Compute.Test/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ [assembly: AssemblyVersion("1.2.2")] [assembly: AssemblyFileVersion("1.2.2")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/AddVhdTests.ps1 b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/AddVhdTests.ps1 index aa86571b34fa..38314cf6460a 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/AddVhdTests.ps1 +++ b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/AddVhdTests.ps1 @@ -49,8 +49,7 @@ function Test-AddVhd Write-Output ("Start Uploading... : " + $testItem.vhdName); $vhdUploadContext = Add-AzureRmVhd -ResourceGroupName $rgname -Destination $vhdDestUri -LocalFilePath $vhdLocalPath -NumberOfUploaderThreads 1; - Start-Sleep -s 5; - + Wait-Seconds 5; Write-Output ("Destination Uri :" + $vhdUploadContext.DestinationUri); Write-Output ("Local File :" + $vhdUploadContext.LocalFilePath.FullName); Write-Output ("Uploading Ended."); diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/DiagnosticsExtensionTests.ps1 b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/DiagnosticsExtensionTests.ps1 index d7a70fefb504..9c83d55485f3 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/DiagnosticsExtensionTests.ps1 +++ b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/DiagnosticsExtensionTests.ps1 @@ -41,7 +41,7 @@ function Test-DiagnosticsExtensionBasic } # Test Set and Get command. It should use the storage account defined in configuration file - Set-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname -DiagnosticsConfigurationPath '.\ConfigFiles\DiagnosticsExtensionConfig.xml' + Set-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname -DiagnosticsConfigurationPath "$TestOutputRoot\ConfigFiles\DiagnosticsExtensionConfig.xml" $extension = Get-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension @@ -92,7 +92,7 @@ function Test-DiagnosticsExtensionSepcifyStorageAccountName Assert-Null $extension } - Set-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname -DiagnosticsConfigurationPath '.\ConfigFiles\DiagnosticsExtensionConfig.xml' -StorageAccountName $storagename + Set-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname -DiagnosticsConfigurationPath "$TestOutputRoot\ConfigFiles\DiagnosticsExtensionConfig.xml" -StorageAccountName $storagename $extension = Get-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension @@ -135,7 +135,7 @@ function Test-DiagnosticsExtensionCantListSepcifyStorageAccountKey # Get a random storage account name, which we can't list the key $storagename = 'notexiststorage' Assert-ThrowsContains ` - { Set-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname -DiagnosticsConfigurationPath '.\ConfigFiles\DiagnosticsExtensionConfig.xml' -StorageAccountName $storagename } ` + { Set-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname -DiagnosticsConfigurationPath "$TestOutputRoot\ConfigFiles\DiagnosticsExtensionConfig.xml" -StorageAccountName $storagename } ` 'Storage account key' } finally @@ -171,7 +171,7 @@ function Test-DiagnosticsExtensionSupportJsonConfig Assert-Null $extension } - Set-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname -DiagnosticsConfigurationPath '.\ConfigFiles\DiagnosticsExtensionConfig.json' -StorageAccountName $storagename + Set-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname -DiagnosticsConfigurationPath "$TestOutputRoot\ConfigFiles\DiagnosticsExtensionConfig.json" -StorageAccountName $storagename $extension = Get-AzureRmVMDiagnosticsExtension -ResourceGroupName $rgname -VMName $vmname Assert-NotNull $extension diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineBootDiagnosticsTests.ps1 b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineBootDiagnosticsTests.ps1 index 0b135842b744..6c77533cb61a 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineBootDiagnosticsTests.ps1 +++ b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineBootDiagnosticsTests.ps1 @@ -128,7 +128,7 @@ function Test-VirtualMachineBootDiagnostics Assert-AreEqual $true $vm1.DiagnosticsProfile.BootDiagnostics.Enabled; Assert-AreEqual $stoaccount.PrimaryEndpoints.Blob $vm1.DiagnosticsProfile.BootDiagnostics.StorageUri; - Start-Sleep -s 600; + Wait-Seconds 600; $localpath = (Get-Item -Path ".\" -Verbose).FullName Get-AzureRmVMBootDiagnosticsData -Windows -ResourceGroupName $rgname -Name $vmname -LocalPath $localpath; @@ -164,7 +164,7 @@ function Test-VirtualMachineBootDiagnostics Assert-AreEqual $true $vm1.DiagnosticsProfile.BootDiagnostics.Enabled; Assert-AreEqual $stoaccount.PrimaryEndpoints.Blob $vm1.DiagnosticsProfile.BootDiagnostics.StorageUri; - Start-Sleep -s 600; + Wait-Seconds 600; $bddata = Get-AzureRmVMBootDiagnosticsData -Linux -ResourceGroupName $rgname -Name $vmname | Out-String; diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.ps1 b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.ps1 index c1f3527c0258..801fed830895 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.ps1 +++ b/src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.ps1 @@ -363,7 +363,7 @@ function Test-VirtualMachinePiping Get-AzureRmVM -ResourceGroupName $rgname | Set-AzureRmVM -Generalize; $dest = Get-ComputeTestResourceName; - $templatePath = ".\template.txt"; + $templatePath = "$TestOutputRoot\template.txt"; Get-AzureRmVM -ResourceGroupName $rgname | Save-AzureRmVMImage -DestinationContainerName $dest -VHDNamePrefix 'pslib' -Overwrite -Path $templatePath; $template = Get-Content $templatePath; @@ -943,7 +943,7 @@ function Test-VirtualMachineCapture Set-AzureRmVM -Generalize -ResourceGroupName $rgname -Name $vmname; $dest = Get-ComputeTestResourceName; - $templatePath = ".\template.txt"; + $templatePath = "$TestOutputRoot\template.txt"; Save-AzureRmVMImage -ResourceGroupName $rgname -VMName $vmname -DestinationContainerName $dest -VHDNamePrefix 'pslib' -Overwrite -Path $templatePath; $template = Get-Content $templatePath; Assert-True { $template[1].Contains("$schema"); } diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/packages.config b/src/ResourceManager/Compute/Commands.Compute.Test/packages.config index 074e077e8ece..d481f67438ee 100644 --- a/src/ResourceManager/Compute/Commands.Compute.Test/packages.config +++ b/src/ResourceManager/Compute/Commands.Compute.Test/packages.config @@ -10,7 +10,7 @@ - + @@ -23,7 +23,11 @@ - - - + + + + + + + diff --git a/src/ResourceManager/Compute/Compute.sln b/src/ResourceManager/Compute/Compute.sln index 341f5f215f76..4675b38ccd59 100644 --- a/src/ResourceManager/Compute/Compute.sln +++ b/src/ResourceManager/Compute/Compute.sln @@ -36,11 +36,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage", "..\..\C EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Common", "..\..\ServiceManagement\Common\Commands.ServiceManagement.Common\Commands.ServiceManagement.Common.csproj", "{CFF09E81-1E31-444E-B4D4-A21E946C29E2}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{F7E358A9-7A65-47DE-8E3A-BAFD75C0E2E9}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/DataFactories/.nuget/packages.config b/src/ResourceManager/DataFactories/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/DataFactories/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj index ca6592ba8c36..25178c3c91d2 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -16,7 +17,7 @@ ..\..\..\ true - 1513e0d4 + ad1fdc7a true @@ -76,11 +77,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -162,12 +163,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Properties/AssemblyInfo.cs index 142d3339ac5b..8950fbf4b858 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config index 7d9a7e2f8e30..719ce947edba 100644 --- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config @@ -9,8 +9,8 @@ - - + + @@ -28,7 +28,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/DataFactories.sln b/src/ResourceManager/DataFactories/DataFactories.sln index 45032305aacf..776515232269 100644 --- a/src/ResourceManager/DataFactories/DataFactories.sln +++ b/src/ResourceManager/DataFactories/DataFactories.sln @@ -24,11 +24,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Rest", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{7865F5ED-E0F3-45CD-87BA-214FE8A27061}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/DataLakeAnalytics/.nuget/packages.config b/src/ResourceManager/DataLakeAnalytics/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/DataLakeAnalytics/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Commands.DataLakeAnalytics.Test.csproj b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Commands.DataLakeAnalytics.Test.csproj index 76b8e02144ea..47587f9eb29d 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Commands.DataLakeAnalytics.Test.csproj +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Commands.DataLakeAnalytics.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\..\..\ true - d191643d + 8f936962 true @@ -83,11 +84,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -149,13 +150,21 @@ - - False - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True - - False - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Properties/AssemblyInfo.cs index 34a508723774..db286067c633 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -33,3 +34,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/packages.config b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/packages.config index cefee762f9f0..8fb539484bf7 100644 --- a/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/packages.config +++ b/src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/packages.config @@ -10,8 +10,8 @@ - - + + @@ -22,7 +22,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/DataLakeAnalytics/DataLakeAnalytics.sln b/src/ResourceManager/DataLakeAnalytics/DataLakeAnalytics.sln index d286e659e490..25f8f1efc2b3 100644 --- a/src/ResourceManager/DataLakeAnalytics/DataLakeAnalytics.sln +++ b/src/ResourceManager/DataLakeAnalytics/DataLakeAnalytics.sln @@ -16,11 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Reso EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{DB56CF72-D058-4B6F-8BD7-C482D06815D1}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" EndProject Global diff --git a/src/ResourceManager/DataLakeStore/.nuget/packages.config b/src/ResourceManager/DataLakeStore/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/DataLakeStore/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/Commands.DataLakeStore.Test.csproj b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/Commands.DataLakeStore.Test.csproj index 32c8970281f4..67fa5978818a 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/Commands.DataLakeStore.Test.csproj +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/Commands.DataLakeStore.Test.csproj @@ -1,7 +1,7 @@  - - + + Debug @@ -16,7 +16,7 @@ ..\..\..\ true - d191643d + d05669d7 true @@ -76,11 +76,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -143,13 +143,21 @@ - - False - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True - - False - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/Properties/AssemblyInfo.cs index e96db409f76e..31c9bbcbf570 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -33,3 +34,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/packages.config b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/packages.config index 3125ba9f5e7c..d1936b0ee56c 100644 --- a/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/packages.config +++ b/src/ResourceManager/DataLakeStore/Commands.DataLakeStore.Test/packages.config @@ -8,8 +8,8 @@ - - + + @@ -20,7 +20,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/DataLakeStore/DataLakeStore.sln b/src/ResourceManager/DataLakeStore/DataLakeStore.sln index ebbe0f1cca12..c5076ff1f44d 100644 --- a/src/ResourceManager/DataLakeStore/DataLakeStore.sln +++ b/src/ResourceManager/DataLakeStore/DataLakeStore.sln @@ -16,11 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Reso EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{DB56CF72-D058-4B6F-8BD7-C482D06815D1}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" EndProject Global diff --git a/src/ResourceManager/Dns/.nuget/packages.config b/src/ResourceManager/Dns/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/Dns/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj b/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj index 55990489bbd8..f86af54d83ab 100644 --- a/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj +++ b/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -16,7 +17,7 @@ ..\..\..\ true /assemblyCompareMode:StrongNameIgnoringVersion - a18e2cb8 + f9d44ab2 true @@ -72,11 +73,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll @@ -131,12 +132,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Dns/Commands.Dns.Test/Properties/AssemblyInfo.cs index b3c7d1989158..d57e3dbfb323 100644 --- a/src/ResourceManager/Dns/Commands.Dns.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Dns/Commands.Dns.Test/Properties/AssemblyInfo.cs @@ -35,3 +35,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/packages.config b/src/ResourceManager/Dns/Commands.Dns.Test/packages.config index 92d3482c8177..be162e8029b0 100644 --- a/src/ResourceManager/Dns/Commands.Dns.Test/packages.config +++ b/src/ResourceManager/Dns/Commands.Dns.Test/packages.config @@ -6,8 +6,8 @@ - - + + @@ -17,7 +17,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Dns/Dns.sln b/src/ResourceManager/Dns/Dns.sln index 021e6f6e2377..51bb234e88d0 100644 --- a/src/ResourceManager/Dns/Dns.sln +++ b/src/ResourceManager/Dns/Dns.sln @@ -22,11 +22,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Dns.Test", "Comman EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{16AF0FE3-9E19-4993-AB3C-6B5AFFE1B39E}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/HDInsight/.nuget/packages.config b/src/ResourceManager/HDInsight/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/HDInsight/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj index f6442251cfca..cc556e500809 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj @@ -1,5 +1,7 @@  + + Debug @@ -13,6 +15,7 @@ 512 ..\..\..\ true + a421d612 true @@ -65,12 +68,12 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll True - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -145,11 +148,21 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs index da6e6fb9c7e5..692ff25cdd97 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -47,3 +48,4 @@ [assembly: AssemblyVersion("1.0.5")] [assembly: AssemblyFileVersion("1.0.5")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/packages.config b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/packages.config index 5508f274b5d8..ffd5f32e9657 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/packages.config +++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/packages.config @@ -5,13 +5,14 @@ + - - + + @@ -26,9 +27,12 @@ - - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight/packages.config b/src/ResourceManager/HDInsight/Commands.HDInsight/packages.config index 1b323da2b19f..dafd25b62630 100644 --- a/src/ResourceManager/HDInsight/Commands.HDInsight/packages.config +++ b/src/ResourceManager/HDInsight/Commands.HDInsight/packages.config @@ -8,7 +8,6 @@ - diff --git a/src/ResourceManager/Insights/.nuget/packages.config b/src/ResourceManager/Insights/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/Insights/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj b/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj index 01f1aa60c727..fb6a4a131ef5 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -16,7 +17,7 @@ ..\..\..\ true {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - d7bcc31d + 7801692f true @@ -66,11 +67,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll ..\..\..\packages\Microsoft.Rest.ClientRuntime.1.8.2\lib\net45\Microsoft.Rest.ClientRuntime.dll @@ -135,12 +136,20 @@ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True @@ -225,7 +234,7 @@ Always - + Always diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Insights/Commands.Insights.Test/Properties/AssemblyInfo.cs index 18172f3dab84..6364b6b7518a 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Insights/Commands.Insights.Test/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/packages.config b/src/ResourceManager/Insights/Commands.Insights.Test/packages.config index 4c3980df126d..b0262f6d9f59 100644 --- a/src/ResourceManager/Insights/Commands.Insights.Test/packages.config +++ b/src/ResourceManager/Insights/Commands.Insights.Test/packages.config @@ -5,9 +5,10 @@ + - - + + @@ -22,9 +23,12 @@ - - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Insights/Insights.sln b/src/ResourceManager/Insights/Insights.sln index 0858da04bbe4..36d29f50e21d 100644 --- a/src/ResourceManager/Insights/Insights.sln +++ b/src/ResourceManager/Insights/Insights.sln @@ -16,11 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Prof EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{30B52263-1C72-4358-A67C-586AC5CD568F}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/Intune/.nuget/packages.config b/src/ResourceManager/Intune/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/Intune/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/Intune/Commands.Intune.Test/Commands.Intune.Test.csproj b/src/ResourceManager/Intune/Commands.Intune.Test/Commands.Intune.Test.csproj index 8c0ebaa951d9..da8cd67ba497 100644 --- a/src/ResourceManager/Intune/Commands.Intune.Test/Commands.Intune.Test.csproj +++ b/src/ResourceManager/Intune/Commands.Intune.Test/Commands.Intune.Test.csproj @@ -1,5 +1,7 @@  + + Debug @@ -14,7 +16,7 @@ ..\ true - 5154d859 + 9c67e65a true @@ -77,9 +79,9 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll True - + False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll True @@ -132,8 +134,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/Intune/Commands.Intune.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Intune/Commands.Intune.Test/Properties/AssemblyInfo.cs index e784fac57392..e8d0dba81db0 100644 --- a/src/ResourceManager/Intune/Commands.Intune.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Intune/Commands.Intune.Test/Properties/AssemblyInfo.cs @@ -35,3 +35,4 @@ [assembly: AssemblyVersion("1.0.3")] [assembly: AssemblyFileVersion("1.0.3")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Intune/Commands.Intune.Test/ScenarioTests/IntuneTestController.cs b/src/ResourceManager/Intune/Commands.Intune.Test/ScenarioTests/IntuneTestController.cs index f075c9ae2626..3a2f8726600e 100644 --- a/src/ResourceManager/Intune/Commands.Intune.Test/ScenarioTests/IntuneTestController.cs +++ b/src/ResourceManager/Intune/Commands.Intune.Test/ScenarioTests/IntuneTestController.cs @@ -15,10 +15,12 @@ namespace Microsoft.Azure.Commands.Intune.Test.ScenarioTests { using Microsoft.Azure.Common.Authentication; using Microsoft.Azure.Management.Intune; + using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.WindowsAzure.Commands.ScenarioTest; using System; using System.Collections.Generic; + using System.IO; using System.Linq; using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory; using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities; @@ -72,6 +74,7 @@ private void RunPsTestWorkflow( string callingClassType, string mockName) { + HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); using (MockContext context = MockContext.Start(callingClassType, mockName)) { SetupManagementClients(context); diff --git a/src/ResourceManager/Intune/Commands.Intune.Test/packages.config b/src/ResourceManager/Intune/Commands.Intune.Test/packages.config index ad36b4f5b858..aca1b894a317 100644 --- a/src/ResourceManager/Intune/Commands.Intune.Test/packages.config +++ b/src/ResourceManager/Intune/Commands.Intune.Test/packages.config @@ -5,7 +5,7 @@ - + @@ -19,5 +19,11 @@ - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Intune/Intune.sln b/src/ResourceManager/Intune/Intune.sln index 309fb210d976..20dd96b26e86 100644 --- a/src/ResourceManager/Intune/Intune.sln +++ b/src/ResourceManager/Intune/Intune.sln @@ -9,11 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ResourceManager.Co EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{AB94E3E7-EBFA-43A2-889E-890D268A609C}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Intune.Test", "Commands.Intune.Test\Commands.Intune.Test.csproj", "{CA5F571B-550B-4BE3-9BA3-06442DF52768}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.ResourceManager.Common", "..\Common\Commands.ScenarioTests.ResourceManager.Common\Commands.ScenarioTests.ResourceManager.Common.csproj", "{3436A126-EDC9-4060-8952-9A1BE34CDD95}" diff --git a/src/ResourceManager/KeyVault/.nuget/packages.config b/src/ResourceManager/KeyVault/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/KeyVault/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj index 330a8bab674c..0cbf5adfe342 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -16,7 +17,7 @@ ..\..\ true {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 8a60455a + 653414c6 true @@ -87,10 +88,10 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -144,12 +145,20 @@ ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Properties/AssemblyInfo.cs index 86090e2a651d..8d9d8cabfae9 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Properties/AssemblyInfo.cs @@ -48,4 +48,5 @@ // by using the '*' as shown below: [assembly: AssemblyVersion( "1.0.0.0" )] -[assembly: AssemblyFileVersion( "1.0.0.0" )] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementController.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementController.cs index 1a261b486462..b8733362ec22 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementController.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementController.cs @@ -26,6 +26,7 @@ using Microsoft.Azure.Management.KeyVault; using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Common; +using System.IO; namespace Microsoft.Azure.Commands.KeyVault.Test { @@ -88,6 +89,7 @@ public void RunPsTestWorkflow( string mockName) { HttpMockServer.Matcher = new PermissiveRecordMatcher(); + HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); using (UndoContext context = UndoContext.Current) { context.Start(callingClassType, mockName); diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementTests.cs b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementTests.cs index da7ec684aad3..4352fe973a85 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementTests.cs +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/ScenarioTests/KeyVaultManagementTests.cs @@ -24,12 +24,14 @@ namespace Microsoft.Azure.Commands.KeyVault.Test.ScenarioTests { - public class KeyVaultManagementTests : IUseFixture + public class KeyVaultManagementTests : IClassFixture { private KeyVaultTestFixture _data; - public KeyVaultManagementTests() + public KeyVaultManagementTests(KeyVaultTestFixture fixture) { + this._data = fixture; + this._data.Initialize(TestUtilities.GetCallingClass()); } private void Initialize() @@ -739,12 +741,6 @@ private void DeleteAdServicePrincipal(KeyVaultManagementController controllerAdm } } #endregion - - public void SetFixture(KeyVaultTestFixture data) - { - this._data = data; - this._data.Initialize(TestUtilities.GetCallingClass()); - } } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/PSHCommon/Common.ps1 b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/PSHCommon/Common.ps1 index f31d69da8ee8..785affd6c48a 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/PSHCommon/Common.ps1 +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/PSHCommon/Common.ps1 @@ -271,7 +271,7 @@ function Wait-Function do { - Start-Sleep -s 5 + Wait-Seconds 5 $current = [DateTime]::Now $diff = $current - $start $result = &$scriptBlock @@ -328,7 +328,7 @@ function Retry-Function $tries = 1; while(( $result -ne $true) -and ($tries -le $maxTries)) { - Start-Sleep -s $interval + Wait-Seconds $interval $result = Invoke-Command -ScriptBlock $scriptBlock -ArgumentList $argument; $tries++; } diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/VaultKeyTests.ps1 b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/VaultKeyTests.ps1 index 695a8d7a69f3..5543196f9a1f 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/VaultKeyTests.ps1 +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/VaultKeyTests.ps1 @@ -594,8 +594,8 @@ function Test_GetAllKeys $run = 5 $i = 1 do { - Write-Host "Sleep 5 seconds before creating another $total keys" - Start-Sleep -s 5 + Write-Host "Sleep 5 seconds before creating another $total keys" + Wait-Seconds 5 BulkCreateSoftKeys $keyVault $keypartialname $total $i++ } while ($i -le $run) @@ -644,8 +644,8 @@ function Test_GetKeyVersions $run = 5 $i = 1 do { - Write-Host "Sleep 5 seconds before creating another $total keys" - Start-Sleep -s 5 + Write-Host "Sleep 5 seconds before creating another $total keys" + Wait-Seconds 5 BulkCreateSoftKeyVersions $keyVault $keyname $total $i++ } while ($i -le $run) diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config index dc23c7d37be6..6c98559a29ea 100644 --- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config +++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config @@ -9,8 +9,8 @@ - - + + @@ -21,6 +21,11 @@ - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/KeyVault/KeyVault.sln b/src/ResourceManager/KeyVault/KeyVault.sln index b6ddad7e6dc6..d0026ceedd50 100644 --- a/src/ResourceManager/KeyVault/KeyVault.sln +++ b/src/ResourceManager/KeyVault/KeyVault.sln @@ -22,11 +22,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Prof EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{33C9DADF-8EE1-4FCB-8E15-FEEB28330BC1}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/LogicApp/.nuget/packages.config b/src/ResourceManager/LogicApp/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/LogicApp/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/Commands.LogicApp.Test.csproj b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/Commands.LogicApp.Test.csproj index a61865bcdd25..5f20b516acd1 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/Commands.LogicApp.Test.csproj +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/Commands.LogicApp.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -19,7 +20,7 @@ False ..\ true - a5adf578 + 396f343f true @@ -78,9 +79,9 @@ False ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - + False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False @@ -125,12 +126,20 @@ False - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/Properties/AssemblyInfo.cs index 4cb1d98dbf19..02a894c8ad27 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/Properties/AssemblyInfo.cs @@ -47,4 +47,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0")] -[assembly: AssemblyFileVersion("1.0.0")] \ No newline at end of file +[assembly: AssemblyFileVersion("1.0.0")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] \ No newline at end of file diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowController.cs b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowController.cs index a685cd20e4f2..1dbefbb6ca48 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowController.cs +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowController.cs @@ -30,6 +30,7 @@ namespace Microsoft.Azure.Commands.LogicApp.Test.ScenarioTests using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory; using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities; using Microsoft.Azure.Management.WebSites; + using System.IO; /// /// Test controller for the logic app scenario testing @@ -135,6 +136,7 @@ public void RunPsTestWorkflow( d.Add("Microsoft.Authorization", AuthorizationApiVersion); HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(false, d); + HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); using (MockContext context = MockContext.Start(callingClassType, mockName)) { this.csmTestFactory = new LegacyTest.CSMTestEnvironmentFactory(); diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTests.ps1 b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTests.ps1 index 6de5830202b2..35ed8e6d6a1a 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTests.ps1 +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/ScenarioTests/WorkflowTests.ps1 @@ -22,8 +22,8 @@ function Test-CreateAndRemoveLogicApp { $resourceGroup = TestSetup-CreateResourceGroup $workflowName = getAssetname - $definitionFilePath = "Resources\TestSimpleWorkflowDefinition.json" - $parameterFilePath = "Resources\TestSimpleWorkflowParameter.json" + $definitionFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowDefinition.json" + $parameterFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowParameter.json" #Create App Service Plan $planName = "StandardServicePlan" @@ -39,8 +39,8 @@ function Test-CreateAndRemoveLogicApp Remove-AzureRmLogicApp -ResourceGroupName $resourceGroup.ResourceGroupName -Name $WorkflowName -Force #Case2 : Using definition object and parameter file - $parameterFilePath = "Resources\TestSimpleWorkflowParameter.json" - $definition = [IO.File]::ReadAllText("Resources\TestSimpleWorkflowDefinition.json") + $parameterFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowParameter.json" + $definition = [IO.File]::ReadAllText("$TestOutputRoot\Resources\TestSimpleWorkflowDefinition.json") $workflowName = getAssetname $workflow = New-AzureRmLogicApp -ResourceGroupName $resourceGroup.ResourceGroupName -Name $workflowName -Definition $definition -ParameterFilePath $parameterFilePath -AppServicePlan $planName @@ -69,8 +69,8 @@ function Test-CreateLogicAppWithDuplicateName $resourceGroup = TestSetup-CreateResourceGroup $workflowName = getAssetname - $definitionFilePath = "Resources\TestSimpleWorkflowDefinition.json" - $parameterFilePath = "Resources\TestSimpleWorkflowParameter.json" + $definitionFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowDefinition.json" + $parameterFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowParameter.json" $resourceGroupName = $resourceGroup.ResourceGroupName #Create App Service Plan @@ -106,8 +106,8 @@ function Test-CreateLogicAppUsingInputfromWorkflowObject $planName = "StandardServicePlan" $Plan = TestSetup-CreateAppServicePlan $resourceGroup.ResourceGroupName $planName - $definitionFilePath = "Resources\TestSimpleWorkflowDefinition.json" - $parameterFilePath = "Resources\TestSimpleWorkflowParameter.json" + $definitionFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowDefinition.json" + $parameterFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowParameter.json" $workflow = New-AzureRmLogicApp -ResourceGroupName $resourceGroupName -Name $workflowName -AppServicePlan $planName -DefinitionFilePath $definitionFilePath -ParameterFilePath $parameterFilePath $workflow = New-AzureRmLogicApp -ResourceGroupName $resourceGroupName -Name $newWorkflowName -AppServicePlan $planName -Definition $workflow.Definition -Parameters $workflow.Parameters @@ -134,7 +134,7 @@ function Test-CreateLogicAppUsingInputParameterAsHashTable $planName = "StandardServicePlan" $Plan = TestSetup-CreateAppServicePlan $resourceGroup.ResourceGroupName $planName - $definitionFilePath = "Resources\TestSimpleWorkflowDefinition.json" + $definitionFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowDefinition.json" $parameters = @{destinationUri="http://www.bing.com"} $workflow = New-AzureRmLogicApp -ResourceGroupName $resourceGroupName -Name $workflowName -DefinitionFilePath $definitionFilePath -Parameters $parameters -AppServicePlan $planName @@ -154,7 +154,7 @@ function Test-CreateLogicAppUsingDefinitionWithTriggers $resourceGroup = TestSetup-CreateResourceGroup $workflowName = getAssetname $resourceGroupName = $resourceGroup.ResourceGroupName - $definitionFilePath = "Resources\TestSimpleWorkflowTriggerDefinition.json" + $definitionFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowTriggerDefinition.json" $planName = "StandardServicePlan" $Plan = TestSetup-CreateAppServicePlan $resourceGroup.ResourceGroupName $planName @@ -177,7 +177,7 @@ function Test-CreateAndGetLogicAppUsingDefinitionWithActions $resourceGroup = TestSetup-CreateResourceGroup $workflowName = getAssetname $resourceGroupName = $resourceGroup.ResourceGroupName - $definitionFilePath = "Resources\TestSimpleWorkflowActionDefinition.json" + $definitionFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowActionDefinition.json" $planName = "StandardServicePlan" $Plan = TestSetup-CreateAppServicePlan $resourceGroup.ResourceGroupName $planName @@ -217,8 +217,8 @@ function Test-RemoveNonExistingLogicApp <# .SYNOPSIS -Test Set-AzureRmLogicApp command to update workflow defintion without parametrs. -Test Set-AzureRmLogicApp command to update workflow defintion and state to Disabled. +Test Set-AzureRmLogicApp command to update workflow definition without parameters. +Test Set-AzureRmLogicApp command to update workflow definition and state to Disabled. Test Set-AzureRmLogicApp command to update workflow state to Enabled. Test Set-AzureRmLogicApp command to set logic app with null definition. Test Set-AzureRmLogicApp command to set non-existing logic app. @@ -232,14 +232,14 @@ function Test-UpdateLogicApp $planName = "StandardServicePlan" $Plan = TestSetup-CreateAppServicePlan $resourceGroup.ResourceGroupName $planName - $simpleDefinitionFilePath = "Resources\TestSimpleWorkflowDefinition.json" - $simpleParameterFilePath = "Resources\TestSimpleWorkflowParameter.json" + $simpleDefinitionFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowDefinition.json" + $simpleParameterFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowParameter.json" $workflow = $resourceGroup | New-AzureRmLogicApp -Name $workflowName -AppServicePlan $planName -DefinitionFilePath $simpleDefinitionFilePath -ParameterFilePath $simpleParameterFilePath Assert-NotNull $workflow #Case1: Update definition with no parameters and disable - $definitionFilePath = "Resources\TestSimpleWorkflowTriggerDefinition.json" + $definitionFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowTriggerDefinition.json" $UpdatedWorkflow = Set-AzureRmLogicApp -ResourceGroupName $resourceGroupName -Name $workflowName -State "Disabled" -DefinitionFilePath $definitionFilePath -Parameters $null @@ -272,7 +272,7 @@ function Test-UpdateLogicApp try { $workflowName = "82D2D842-C312-445C-8A4D-E3EE9542436D" - $definitionFilePath = "Resources\TestSimpleWorkflowTriggerDefinition.json" + $definitionFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowTriggerDefinition.json" Set-AzureRmLogicApp -ResourceGroupName $resourceGroupName -Name $workflowName -AppServicePlan $planName -DefinitionFilePath $definitionFilePath } catch @@ -290,8 +290,8 @@ function Test-CreateLogicAppWithNonExistingAppServicePlan $resourceGroup = TestSetup-CreateResourceGroup $workflowName = getAssetname $resourceGroupName = $resourceGroup.ResourceGroupName - $definitionFilePath = "Resources\TestSimpleWorkflowDefinition.json" - $parameterFilePath = "Resources\TestSimpleWorkflowParameter.json" + $definitionFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowDefinition.json" + $parameterFilePath = "$TestOutputRoot\Resources\TestSimpleWorkflowParameter.json" $Plan = "B9F87338CAE4470F9116F3D685365748" try { diff --git a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/packages.config b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/packages.config index 3e8f833721fe..5e9e8fb3def1 100644 --- a/src/ResourceManager/LogicApp/Commands.LogicApp.Test/packages.config +++ b/src/ResourceManager/LogicApp/Commands.LogicApp.Test/packages.config @@ -9,7 +9,7 @@ - + @@ -18,10 +18,14 @@ - - + + - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/LogicApp/LogicApp.sln b/src/ResourceManager/LogicApp/LogicApp.sln index 97fc1d8da769..33eaea6250b3 100644 --- a/src/ResourceManager/LogicApp/LogicApp.sln +++ b/src/ResourceManager/LogicApp/LogicApp.sln @@ -16,11 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Prof EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{33C9DADF-8EE1-4FCB-8E15-FEEB28330BC1}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.LogicApp", "Commands.LogicApp\Commands.LogicApp.csproj", "{FFE4E475-B32C-4F89-9D52-F7CEBF709C74}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.LogicApp.Test", "Commands.LogicApp.Test\Commands.LogicApp.Test.csproj", "{F1F11BB1-592B-45A3-844C-7F8A585AD107}" diff --git a/src/ResourceManager/Network/.nuget/packages.config b/src/ResourceManager/Network/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/Network/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj b/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj index 9e5c464bc0ad..9908993b24df 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj +++ b/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\..\..\ true - c796be6d + 7f1b82e3 true @@ -74,7 +75,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.4.0-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll @@ -143,12 +144,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs b/src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs index 6fc9f2e44434..3e5139cd26cb 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs @@ -24,6 +24,8 @@ using Microsoft.Azure.Common.Authentication; using RestTestFramework = Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Test.HttpRecorder; +using System.IO; namespace Commands.Network.Test { @@ -77,6 +79,7 @@ public void RunPsTestWorkflow( string callingClassType, string mockName) { + HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); using (RestTestFramework.MockContext context = RestTestFramework.MockContext.Start(callingClassType, mockName)) { this.csmTestFactory = new CSMTestEnvironmentFactory(); diff --git a/src/ResourceManager/Network/Commands.Network.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Network/Commands.Network.Test/Properties/AssemblyInfo.cs index 7f36868b4f31..dfe5a4324068 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Network/Commands.Network.Test/packages.config b/src/ResourceManager/Network/Commands.Network.Test/packages.config index 9094371fac7c..6ef6d2b3bb39 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/packages.config +++ b/src/ResourceManager/Network/Commands.Network.Test/packages.config @@ -9,7 +9,7 @@ - + @@ -22,7 +22,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Network/Network.sln b/src/ResourceManager/Network/Network.sln index c4eed8bb5e5f..828d39e9f320 100644 --- a/src/ResourceManager/Network/Network.sln +++ b/src/ResourceManager/Network/Network.sln @@ -24,11 +24,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Prof EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{CC3087D9-4907-416C-B3FE-EF68BF6AC42E}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/NotificationHubs/.nuget/packages.config b/src/ResourceManager/NotificationHubs/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/NotificationHubs/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/Commands.NotificationHubs.Test.csproj b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/Commands.NotificationHubs.Test.csproj index 9b79dce830b9..ff4e4de357ac 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/Commands.NotificationHubs.Test.csproj +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/Commands.NotificationHubs.Test.csproj @@ -1,5 +1,7 @@  + + Debug @@ -13,7 +15,7 @@ 512 ..\..\..\ true - b567f9bb + 72aa27f0 true @@ -73,10 +75,10 @@ True - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll @@ -136,12 +138,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True @@ -183,4 +193,4 @@ - + \ No newline at end of file diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/Properties/AssemblyInfo.cs index cf3340d09fa8..be11fc52e466 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -34,3 +35,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/NotificationHubServiceTests.ps1 b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/NotificationHubServiceTests.ps1 index 9d8d9cc14489..fe05a613af0e 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/NotificationHubServiceTests.ps1 +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/NotificationHubServiceTests.ps1 @@ -58,11 +58,7 @@ function Test-CRUDNamespace Write-Debug " Create new notificationHub namespace" Write-Debug "NamespaceName : $namespaceName" $result = New-AzureRmNotificationHubsNamespace -ResourceGroup $resourceGroupName -Namespace $namespaceName -Location $location - - if($env:AZURE_TEST_MODE -ne "Playback") - { - Start-Sleep -Seconds 15 - } + Wait-Seconds 15 Write-Debug "Get the created namespace within the resource group" $createdNamespace = Get-AzureRmNotificationHubsNamespace -ResourceGroup $resourceGroupName -Namespace $namespaceName @@ -92,11 +88,7 @@ function Test-CRUDNamespace $namespaceName2 = Get-NamespaceName Write-Debug "Namespace name : $namespaceName2" $result = New-AzureRmNotificationHubsNamespace -ResourceGroup $secondResourceGroup -Namespace $namespaceName2 -Location $location - - if($env:AZURE_TEST_MODE -ne "Playback") - { - Start-Sleep -Seconds 15 - } + Wait-Seconds 15 Write-Debug "Get all the namespaces created in the resourceGroup" $allCreatedNamespace = Get-AzureRmNotificationHubsNamespace -ResourceGroup $secondResourceGroup @@ -150,11 +142,7 @@ function Test-CRUDNamespace $updatedNamespace = Set-AzureRmNotificationHubsNamespace -ResourceGroup $secondResourceGroup -Namespace $namespaceName2 -Location $location -Tags $tags Assert-AreEqual 2 $updatedNamespace.Tags.Count - - if($env:AZURE_TEST_MODE -ne "Playback") - { - Start-Sleep -Seconds 15 - } + Wait-Seconds 15 Write-Debug " Get the updated namespace " $getUpdatedNamespace = Get-AzureRmNotificationHubsNamespace -ResourceGroup $secondResourceGroup -Namespace $namespaceName2 @@ -189,12 +177,8 @@ function Test-CRUDNamespaceAuth Write-Debug "Namespace name : $namespaceName" $result = New-AzureRmNotificationHubsNamespace -ResourceGroup $resourceGroupName -Namespace $namespaceName -Location $location - - if($env:AZURE_TEST_MODE -ne "Playback") - { - Start-Sleep -Seconds 15 - } - + Wait-Seconds 15 + Write-Debug " Get the created namespace within the resource group" $createdNamespace = Get-AzureRmNotificationHubsNamespace -ResourceGroup $resourceGroupName -Namespace $namespaceName Assert-True {$createdNamespace.Count -eq 1} @@ -293,11 +277,7 @@ function Test-CRUDNamespaceAuth Assert-True { $updatedAuthRule.Rights -Contains "Manage" } Assert-AreEqual $newPrimaryKey $updatedAuthRule.PrimaryKey Assert-NotNull $updatedAuthRule.SecondaryKey - - if($env:AZURE_TEST_MODE -ne "Playback") - { - Start-Sleep -Seconds 15 - } + Wait-Seconds 15 Write-Debug "Get updated Namespace AuthorizationRules" $updatedAuthRule = Get-AzureRmNotificationHubsNamespaceAuthorizationRules -ResourceGroup $resourceGroupName -Namespace $namespaceName -AuthorizationRule $authRuleName @@ -346,11 +326,7 @@ function Test-CRUDNotificationHub Write-Debug " Create new notificationHub namespace" Write-Debug " Namespace name : $namespaceName" $result = New-AzureRmNotificationHubsNamespace -ResourceGroup $resourceGroupName -Namespace $namespaceName -Location $location - - if($env:AZURE_TEST_MODE -ne "Playback") - { - Start-Sleep -Seconds 15 - } + Wait-Seconds 15 Write-Debug " Get the created namespace within the resource group" $createdNamespace = Get-AzureRmNotificationHubsNamespace -ResourceGroup $resourceGroupName -Namespace $namespaceName @@ -425,11 +401,7 @@ function Test-CRUDNotificationHub $createdNotificationHub.WnsCredential.Properties.SecretKey = "w7TBprR-9tJxn9mUOdK4PPHLCAzSYFhp" $createdNotificationHub.WnsCredential.Properties.WindowsLiveEndpoint = "http://pushtestservice.cloudapp.net/LiveID/accesstoken.srf" $result = Set-AzureRmNotificationHub -ResourceGroup $resourceGroupName -Namespace $namespaceName -NotificationHubObj $createdNotificationHub - - if($env:AZURE_TEST_MODE -ne "Playback") - { - Start-Sleep -Seconds 15 - } + Wait-Seconds 15 Write-Debug " Get the PNS credentials for the first notificationHub created" $pnsCredentials = Get-AzureRmNotificationHubPNSCredentials -ResourceGroup $resourceGroupName -Namespace $namespaceName -NotificationHub $notificationHubName @@ -467,11 +439,7 @@ function Test-CRUDNHAuth Write-Debug " Create new notificationHub namespace" Write-Debug "Namespace name : $namespaceName" $result = New-AzureRmNotificationHubsNamespace -ResourceGroup $resourceGroupName -Namespace $namespaceName -Location $location - - if($env:AZURE_TEST_MODE -ne "Playback") - { - Start-Sleep -Seconds 15 - } + Wait-Seconds 15 Write-Debug " Get the created namespace within the resource group" $createdNamespace = Get-AzureRmNotificationHubsNamespace -ResourceGroup $resourceGroupName -Namespace $namespaceName @@ -508,11 +476,7 @@ function Test-CRUDNHAuth Assert-AreEqual 2 $result.Rights.Count Assert-True { $result.Rights -Contains "Listen" } Assert-True { $result.Rights -Contains "Send" } - - if($env:AZURE_TEST_MODE -ne "Playback") - { - Start-Sleep -Seconds 15 - } + Wait-Seconds 15 Write-Debug "Get created authorizationRule" $createdAuthRule = Get-AzureRmNotificationHubAuthorizationRules -ResourceGroup $resourceGroupName -Namespace $namespaceName -NotificationHub $notificationHubName -AuthorizationRule $authRuleName @@ -559,11 +523,7 @@ function Test-CRUDNHAuth Assert-True { $updatedAuthRule.Rights -Contains "Manage" } Assert-AreEqual $newPrimaryKey $updatedAuthRule.PrimaryKey Assert-NotNull $updatedAuthRule.SecondaryKey - - if($env:AZURE_TEST_MODE -ne "Playback") - { - Start-Sleep -Seconds 15 - } + Wait-Seconds 15 $updatedAuthRule = Get-AzureRmNotificationHubAuthorizationRules -ResourceGroup $resourceGroupName -Namespace $namespaceName -NotificationHub $notificationHubName -AuthorizationRule $authRuleName diff --git a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/packages.config b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/packages.config index 7409c8cf0c84..565cd2327cca 100644 --- a/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/packages.config +++ b/src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/packages.config @@ -7,8 +7,8 @@ - - + + @@ -18,7 +18,11 @@ - - - + + + + + + + diff --git a/src/ResourceManager/NotificationHubs/NotificationHubs.sln b/src/ResourceManager/NotificationHubs/NotificationHubs.sln index 769bde41cbd5..db3508bee465 100644 --- a/src/ResourceManager/NotificationHubs/NotificationHubs.sln +++ b/src/ResourceManager/NotificationHubs/NotificationHubs.sln @@ -12,11 +12,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Reso EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{73CD233D-7CEC-4BBE-8BA4-1BB83627BD61}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.NotificationHubs.Test", "Commands.NotificationHubs.Test\Commands.NotificationHubs.Test.csproj", "{EA66BF2C-4E5F-42FE-912C-B62AEB588308}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.NotificationHubs", "Commands.NotificationHubs\Commands.NotificationHubs.csproj", "{0C90F837-86C9-4205-858B-4D8DA5CB0352}" diff --git a/src/ResourceManager/OperationalInsights/.nuget/packages.config b/src/ResourceManager/OperationalInsights/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/OperationalInsights/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj index d21f1a32e1e3..6c2e8264e998 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Commands.OperationalInsights.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ 512 ..\..\..\ true - 07d4b600 + 3170476c true @@ -70,11 +71,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll @@ -131,12 +132,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Properties/AssemblyInfo.cs index fdad9c8f317f..5b0f35772fbe 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/Properties/AssemblyInfo.cs @@ -35,3 +35,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/packages.config b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/packages.config index f98a8534d963..9ba0ededde23 100644 --- a/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/packages.config +++ b/src/ResourceManager/OperationalInsights/Commands.OperationalInsights.Test/packages.config @@ -8,8 +8,8 @@ - - + + @@ -20,7 +20,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/OperationalInsights/OperationalInsights.sln b/src/ResourceManager/OperationalInsights/OperationalInsights.sln index 1b0c1f52942c..713a3511a46d 100644 --- a/src/ResourceManager/OperationalInsights/OperationalInsights.sln +++ b/src/ResourceManager/OperationalInsights/OperationalInsights.sln @@ -22,11 +22,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Co EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{7A5F6CD4-93F9-47E4-BC0F-05DB35DEA84D}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/Profile/.nuget/packages.config b/src/ResourceManager/Profile/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/Profile/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/Commands.Profile.Test.csproj b/src/ResourceManager/Profile/Commands.Profile.Test/Commands.Profile.Test.csproj index 048602ac9837..c6b75ca88a1f 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/Commands.Profile.Test.csproj +++ b/src/ResourceManager/Profile/Commands.Profile.Test/Commands.Profile.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -16,7 +17,7 @@ ..\..\..\ true {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 98e53b12 + 5c66c04b true @@ -72,11 +73,11 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.14-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll True - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -166,12 +167,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.ps1 b/src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.ps1 index 38f7b902e4a0..8dc26becc6e9 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.ps1 +++ b/src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.ps1 @@ -23,7 +23,7 @@ function Test-LoadProfileModule $global:pushedProfileModule = $(Get-Module AzureRM.Profile).Path Remove-Module AzureRM.Profile try { - Register-PSRepository -Name "ProfileModuleTest" -SourceLocation (Resolve-Path .\FakeModuleRepo).Path -InstallationPolicy Trusted + Register-PSRepository -Name "ProfileModuleTest" -SourceLocation (Resolve-Path "$TestOutputRoot\FakeModuleRepo").Path -InstallationPolicy Trusted try { Install-Module AzureRM.ApiManagement -Scope CurrentUser -Repository ProfileModuleTest -RequiredVersion 998.9.8 $global:buffer = Import-Module $global:pushedProfileModule 2>&1 3>&1 | Out-String diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Profile/Commands.Profile.Test/Properties/AssemblyInfo.cs index 38345b60ee46..f9ddb89aaa5c 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/Properties/AssemblyInfo.cs @@ -27,3 +27,4 @@ [assembly: CLSCompliant(false)] [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/TypeConversionTests.cs b/src/ResourceManager/Profile/Commands.Profile.Test/TypeConversionTests.cs index 5e42f5ecdae5..f710149c84f3 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/TypeConversionTests.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/TypeConversionTests.cs @@ -174,7 +174,7 @@ public void CanConvertValidAzureAccounts(string id, AzureAccount.AccountType typ var account = (PSAzureRmAccount) oldAccount; Assert.Equal(oldAccount.Type.ToString(), account.AccountType); Assert.Equal(oldAccount.Id, account.Id); - Assert.DoesNotThrow(() => account.ToString()); + var accountString = account.ToString(); } [Fact] diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/packages.config b/src/ResourceManager/Profile/Commands.Profile.Test/packages.config index 673778ff6b1f..1bbacafdfc26 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/packages.config +++ b/src/ResourceManager/Profile/Commands.Profile.Test/packages.config @@ -6,8 +6,8 @@ - - + + @@ -26,7 +26,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Profile/Profile.sln b/src/ResourceManager/Profile/Profile.sln index cc10e831f679..eeb568975b82 100644 --- a/src/ResourceManager/Profile/Profile.sln +++ b/src/ResourceManager/Profile/Profile.sln @@ -14,11 +14,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Reso EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{DB56CF72-D058-4B6F-8BD7-C482D06815D1}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/RecoveryServices/.nuget/packages.config b/src/ResourceManager/RecoveryServices/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/RecoveryServices/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj index b611580eb0f8..b7c0fc157a56 100644 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj +++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj @@ -1,6 +1,6 @@  - + Debug @@ -14,7 +14,8 @@ 512 ..\..\..\ true - 0df6d68c + + true @@ -55,14 +56,14 @@ False ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - + False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll True False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -120,12 +121,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/packages.config b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/packages.config index b4e0f2f7bb03..913e27ac45f7 100644 --- a/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/packages.config +++ b/src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Test/packages.config @@ -6,8 +6,8 @@ - - + + @@ -17,7 +17,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/RecoveryServices/RecoveryServices.sln b/src/ResourceManager/RecoveryServices/RecoveryServices.sln index dd29e4c87884..170fa659804e 100644 --- a/src/ResourceManager/RecoveryServices/RecoveryServices.sln +++ b/src/ResourceManager/RecoveryServices/RecoveryServices.sln @@ -12,11 +12,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Prof EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{5BA788C3-822D-453A-AABD-77D417D5A715}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RecoveryServices.Test", "Commands.RecoveryServices.Test\Commands.RecoveryServices.Test.csproj", "{6C7D3D81-37AB-445E-8081-78A1FEC0A773}" EndProject Global diff --git a/src/ResourceManager/RedisCache/.nuget/packages.config b/src/ResourceManager/RedisCache/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/RedisCache/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj index 1a1364e4e8c5..470d307781a0 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\..\..\ true - 7d30c2c1 + 94efee6d true @@ -70,11 +71,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll @@ -164,12 +165,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Properties/AssemblyInfo.cs index 8a5dc0f08d44..e7f719757389 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ [assembly: AssemblyVersion("1.1.2")] [assembly: AssemblyFileVersion("1.1.2")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config index bb1e8a42c39a..6d5d0dca6aa6 100644 --- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config @@ -8,8 +8,8 @@ - - + + @@ -26,7 +26,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/RedisCache.sln b/src/ResourceManager/RedisCache/RedisCache.sln index 80d410393a71..0f8569262a39 100644 --- a/src/ResourceManager/RedisCache/RedisCache.sln +++ b/src/ResourceManager/RedisCache/RedisCache.sln @@ -16,11 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Reso EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{73CD233D-7CEC-4BBE-8BA4-1BB83627BD61}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/Resources/.nuget/packages.config b/src/ResourceManager/Resources/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/Resources/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj index 9956ad8d269c..1822e4b96dcf 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -16,7 +17,7 @@ ..\..\..\ true {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 431dced7 + 7d08e8e3 true @@ -78,10 +79,10 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -168,12 +169,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs index 46504497e430..e1790937adc2 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs @@ -28,6 +28,7 @@ using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; using Xunit; +using System; namespace Microsoft.Azure.Commands.Resources.Test.Models { @@ -37,13 +38,13 @@ public class GalleryTemplatesClientTests : RMTestBase private Mock galleryClientMock; - private string templateFile = @"Resources\sampleTemplateFile.json"; + private string templateFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\sampleTemplateFile.json"); - private string invalidTemplateFile = @"Resources\invalidTemplateFile.json"; + private string invalidTemplateFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\invalidTemplateFile.json"); - private string templateParameterFileSchema1 = @"Resources\sampleTemplateParameterFile.json"; + private string templateParameterFileSchema1 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\sampleTemplateParameterFile.json"); - private string templateParameterFileSchema2 = @"Resources\sampleTemplateParameterFileSchema2.json"; + private string templateParameterFileSchema2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\sampleTemplateParameterFileSchema2.json"); public GalleryTemplatesClientTests() { diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs index d9337fe144bd..4fd392f84826 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs @@ -34,6 +34,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; +using System.IO; namespace Microsoft.Azure.Commands.Resources.Test.Models { @@ -69,7 +70,7 @@ public class ResourceClientTests : RMTestBase private string deploymentName = "fooDeployment"; - private string templateFile = @"Resources\sampleTemplateFile.json"; + private string templateFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\sampleTemplateFile.json"); private string storageAccountName = "myStorageAccount"; diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Properties/AssemblyInfo.cs index 3ec000b7a648..36bd1571037b 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -33,3 +34,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs index 3f0f8b515afa..b2536c95f088 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs @@ -21,6 +21,7 @@ using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; using Xunit; +using System.IO; namespace Microsoft.Azure.Commands.Resources.Test { @@ -36,7 +37,7 @@ public class NewAzureResourceGroupDeploymentCommandTests : RMTestBase private string deploymentName = "fooDeployment"; - private string templateFile = @"Resources\sampleTemplateFile.json"; + private string templateFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\sampleTemplateFile.json"); private string storageAccountName = "myStorageAccount"; diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommandTests.cs index b752368947ad..311f5a161dd0 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/TestAzureResourceGroupDeploymentCommandTests.cs @@ -20,6 +20,8 @@ using Moq; using Xunit; using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System.IO; +using System; namespace Microsoft.Azure.Commands.Resources.Test.Resources { @@ -33,7 +35,7 @@ public class TestAzureResourceGroupDeploymentCommandTests private string resourceGroupName = "myResourceGroup"; - private string templateFile = @"Resources\sampleTemplateFile.json"; + private string templateFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\sampleTemplateFile.json"); public TestAzureResourceGroupDeploymentCommandTests() { diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs index 3c1061257087..e58cd648218d 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs @@ -20,6 +20,8 @@ using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Moq; using Xunit; +using System.IO; +using System; namespace Microsoft.Azure.Commands.Resources.Test { @@ -37,7 +39,7 @@ public class NewAzureResourceGroupCommandTests : RMTestBase private string deploymentName = "fooDeployment"; - private string templateFile = @"Resources\sampleTemplateFile.json"; + private string templateFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\sampleTemplateFile.json"); private Hashtable[] tags; diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/PolicyTests.ps1 b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/PolicyTests.ps1 index 9241d43a1148..567570efc8f5 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/PolicyTests.ps1 +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/PolicyTests.ps1 @@ -22,7 +22,7 @@ function Test-PolicyDefinitionCRUD $policyName = Get-ResourceName # Test - $actual = New-AzureRMPolicyDefinition -Name $policyName -Policy SamplePolicyDefinition.json + $actual = New-AzureRMPolicyDefinition -Name $policyName -Policy "$TestOutputRoot\SamplePolicyDefinition.json" $expected = Get-AzureRMPolicyDefinition -Name $policyName Assert-AreEqual $expected.Name $actual.Name Assert-AreEqual $expected.PolicyDefinitionId $actual.PolicyDefinitionId @@ -54,7 +54,7 @@ function Test-PolicyAssignmentCRUD # Test $rg = New-AzureRMResourceGroup -Name $rgname -Location "west us" - $policy = New-AzureRMPolicyDefinition -Name $policyName -Policy SamplePolicyDefinition.json + $policy = New-AzureRMPolicyDefinition -Name $policyName -Policy "$TestOutputRoot\SamplePolicyDefinition.json" $actual = New-AzureRMPolicyAssignment -Name testPA -PolicyDefinition $policy -Scope $rg.ResourceId $expected = Get-AzureRMPolicyAssignment -Name testPA -Scope $rg.ResourceId diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config index 1525052f568a..8b5873d6e160 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config +++ b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config @@ -10,8 +10,8 @@ - - + + @@ -27,7 +27,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs index 492544706179..365c29c5bacd 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs @@ -321,7 +321,7 @@ private DeploymentExtended WaitDeploymentStatus( } deployment = ResourceManagementClient.Deployments.Get(resourceGroup, deploymentName).Deployment; - Thread.Sleep(2000); + TestMockSupport.Delay(2000); } while (!status.Any(s => s.Equals(deployment.Properties.ProvisioningState, StringComparison.OrdinalIgnoreCase))); diff --git a/src/ResourceManager/Resources/Resources.sln b/src/ResourceManager/Resources/Resources.sln index aad07e839e53..8fb07dab530d 100644 --- a/src/ResourceManager/Resources/Resources.sln +++ b/src/ResourceManager/Resources/Resources.sln @@ -20,11 +20,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Prof EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{AC2CA92A-5715-44D6-B933-739F344E5F6F}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/SiteRecovery/.nuget/packages.config b/src/ResourceManager/SiteRecovery/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/SiteRecovery/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Commands.SiteRecovery.Test.csproj b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Commands.SiteRecovery.Test.csproj index d05ef52db5ee..b0fc61f82309 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Commands.SiteRecovery.Test.csproj +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Commands.SiteRecovery.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -14,7 +15,7 @@ 512 ..\..\..\ true - 0df6d68c + a58e9cfa true @@ -56,10 +57,10 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -116,12 +117,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Properties/AssemblyInfo.cs index 94e034694b14..bd95f923af5b 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/Properties/AssemblyInfo.cs @@ -45,3 +45,4 @@ [assembly: AssemblyVersion("1.1.3")] [assembly: AssemblyFileVersion("1.1.3")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] \ No newline at end of file diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTests.ps1 b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTests.ps1 index 2d7474cc1131..935f8189f02d 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTests.ps1 +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTests.ps1 @@ -151,7 +151,7 @@ function WaitForJobCompletion $interval = 5; do { - Start-Sleep $interval + Wait-Seconds $interval $timeElapse = $timeElapse + $interval $job = Get-AzureRmSiteRecoveryJob -Name $JobId; } while((-not ($endStateDescription -ccontains $job.State)) -and ($timeElapse -lt $NumOfSecondsToWait)) diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTestsBase.cs b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTestsBase.cs index a35a199af046..2e90131e616a 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTestsBase.cs +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/ScenarioTests/SiteRecoveryTestsBase.cs @@ -40,10 +40,10 @@ public abstract class SiteRecoveryTestsBase : RMTestBase public SiteRecoveryManagementClient SiteRecoveryMgmtClient { get; private set; } public RecoveryServicesManagementClient RecoveryServicesMgmtClient { get; private set; } - + protected SiteRecoveryTestsBase() { - this.vaultSettingsFilePath = "ScenarioTests\\vaultSettings.VaultCredentials"; + this.vaultSettingsFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScenarioTests\\vaultSettings.VaultCredentials"); if (File.Exists(this.vaultSettingsFilePath)) { @@ -73,7 +73,9 @@ protected SiteRecoveryTestsBase() else { throw new FileNotFoundException( - "Vault settings file not found, please pass the file downloaded from portal"); + string.Format( + "Vault settings file not found at '{0}', please pass the file downloaded from portal", + this.vaultSettingsFilePath)); } helper = new EnvironmentSetupHelper(); diff --git a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/packages.config b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/packages.config index ad227c101eb8..a242f512dd32 100644 --- a/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/packages.config +++ b/src/ResourceManager/SiteRecovery/Commands.SiteRecovery.Test/packages.config @@ -6,8 +6,8 @@ - - + + @@ -17,7 +17,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/SiteRecovery/SiteRecovery.sln b/src/ResourceManager/SiteRecovery/SiteRecovery.sln index 0df8099f8ff5..2136cd6804f0 100644 --- a/src/ResourceManager/SiteRecovery/SiteRecovery.sln +++ b/src/ResourceManager/SiteRecovery/SiteRecovery.sln @@ -16,11 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Prof EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{5BA788C3-822D-453A-AABD-77D417D5A715}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj index 21111f6c9724..1684bb0dcf48 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj +++ b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -16,7 +17,7 @@ ..\..\..\ true /assemblyCompareMode:StrongNameIgnoringVersion - 35c46d19 + b014b9b4 true @@ -84,10 +85,10 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -174,12 +175,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True @@ -210,7 +219,6 @@ PreserveNewest - PreserveNewest diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Sql/Commands.Sql.Test/Properties/AssemblyInfo.cs index 9b3cbf1a7db4..7c390846923a 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Sql/Commands.Sql.Test/Properties/AssemblyInfo.cs @@ -35,3 +35,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ServerUpgradeTests.ps1 b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ServerUpgradeTests.ps1 index fbd4ad822463..fb2febb9c31c 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ServerUpgradeTests.ps1 +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/ServerUpgradeTests.ps1 @@ -49,11 +49,7 @@ function Test-ServerUpgradeWithUpgradeHint Assert-AreEqual $server.ServerVersion "2.0" break } - - if ($env:AZURE_TEST_MODE -eq "Record") - { - Start-Sleep -Seconds 10 - } + Wait-Seconds 10 } } finally @@ -90,11 +86,7 @@ function Test-ServerUpgradeAndCancel { break } - - if ($env:AZURE_TEST_MODE -eq "Record") - { - Start-Sleep -Seconds 10 - } + Wait-Seconds 10 } # Upgrade is cancelled diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config index 2f4bb1985e64..46e04818ff22 100644 --- a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config +++ b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config @@ -11,8 +11,8 @@ - - + + @@ -29,7 +29,11 @@ - - - + + + + + + + diff --git a/src/ResourceManager/Sql/Sql.sln b/src/ResourceManager/Sql/Sql.sln index e2e3d1142475..8dcf5b48785b 100644 --- a/src/ResourceManager/Sql/Sql.sln +++ b/src/ResourceManager/Sql/Sql.sln @@ -32,11 +32,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Insights", "..\Ins EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Common", "..\..\ServiceManagement\Common\Commands.ServiceManagement.Common\Commands.ServiceManagement.Common.csproj", "{CFF09E81-1E31-444E-B4D4-A21E946C29E2}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{7025EE1A-63F8-4488-B0D9-02141EB18C8E}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj b/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj index db311499f5db..4bb8a2010c92 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj +++ b/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj @@ -1,5 +1,7 @@  + + Debug @@ -13,7 +15,7 @@ 512 ..\..\..\..\ true - e6b6ae5d + f747f8a7 true @@ -61,10 +63,10 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -110,12 +112,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/Storage/Commands.Management.Storage.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Storage/Commands.Management.Storage.Test/Properties/AssemblyInfo.cs index 7cf98a99b3e0..a437befdff39 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage.Test/Properties/AssemblyInfo.cs @@ -49,3 +49,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config b/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config index 1020e30991b4..6263612efef3 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config +++ b/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config @@ -8,8 +8,8 @@ - - + + @@ -18,6 +18,11 @@ - - + + + + + + + diff --git a/src/ResourceManager/StreamAnalytics/.nuget/packages.config b/src/ResourceManager/StreamAnalytics/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/StreamAnalytics/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj index ca49b54e447e..f02811fca677 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ 512 ..\..\..\ true - e11bc73b + 447ecd03 true @@ -74,11 +75,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -156,12 +157,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Properties/AssemblyInfo.cs index 2c87c95404a9..d20f1da86e59 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Properties/AssemblyInfo.cs @@ -35,3 +35,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config index 72de9ad6da3e..cf29232eed64 100644 --- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config +++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config @@ -9,8 +9,8 @@ - - + + @@ -27,7 +27,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/StreamAnalytics/StreamAnalytics.sln b/src/ResourceManager/StreamAnalytics/StreamAnalytics.sln index b8ff230514a9..9d241c5dc78e 100644 --- a/src/ResourceManager/StreamAnalytics/StreamAnalytics.sln +++ b/src/ResourceManager/StreamAnalytics/StreamAnalytics.sln @@ -28,11 +28,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Rest", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{02FF609A-B93B-4CDE-89FD-F7E9B9BA45E0}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/TrafficManager/.nuget/packages.config b/src/ResourceManager/TrafficManager/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/TrafficManager/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager.Test.csproj b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager.Test.csproj index fbe175d36e52..6f855ca30a6b 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager.Test.csproj +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\ true - a5adf578 + 0e772c9e true @@ -69,11 +70,11 @@ False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -106,12 +107,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Properties/AssemblyInfo.cs index f4cc8e779772..e8ff44f2aea0 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Properties/AssemblyInfo.cs @@ -47,3 +47,4 @@ // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/packages.config b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/packages.config index 9a8288be0e93..a12ac64d64d4 100644 --- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/packages.config +++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/packages.config @@ -7,8 +7,8 @@ - - + + @@ -19,7 +19,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/TrafficManager/TrafficManager.sln b/src/ResourceManager/TrafficManager/TrafficManager.sln index 39965396e140..86bd2ca81848 100644 --- a/src/ResourceManager/TrafficManager/TrafficManager.sln +++ b/src/ResourceManager/TrafficManager/TrafficManager.sln @@ -22,11 +22,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Rest", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{899AAE30-3C07-4F4F-8806-F36A26D7EA5F}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/UsageAggregates/.nuget/packages.config b/src/ResourceManager/UsageAggregates/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/UsageAggregates/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Commands.UsageAggregates.Test.csproj b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Commands.UsageAggregates.Test.csproj index 9522e2881e3b..b45a02f80f27 100644 --- a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Commands.UsageAggregates.Test.csproj +++ b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Commands.UsageAggregates.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -14,7 +15,7 @@ 512 ..\..\..\ true - 970255a4 + 32362ec3 true @@ -55,11 +56,11 @@ True - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll True - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -94,12 +95,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Properties/AssemblyInfo.cs index c4ab8a641630..24be33e2f1b5 100644 --- a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/Properties/AssemblyInfo.cs @@ -34,3 +34,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/packages.config b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/packages.config index 5ae0f178e49b..5465efef8053 100644 --- a/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/packages.config +++ b/src/ResourceManager/UsageAggregates/Commands.UsageAggregates.Test/packages.config @@ -5,8 +5,8 @@ - - + + @@ -16,7 +16,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/UsageAggregates/UsageAggregates.sln b/src/ResourceManager/UsageAggregates/UsageAggregates.sln index 4a2cf26659bc..1f0626abd5e7 100644 --- a/src/ResourceManager/UsageAggregates/UsageAggregates.sln +++ b/src/ResourceManager/UsageAggregates/UsageAggregates.sln @@ -16,11 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "..\Prof EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{75D9D053-E4E9-411E-8337-E982178E886F}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ResourceManager/Websites/.nuget/packages.config b/src/ResourceManager/Websites/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ResourceManager/Websites/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj b/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj index ca3a60b83588..acb32e0c3634 100644 --- a/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj +++ b/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\ true - c8f5e508 + 88c2059b true @@ -73,9 +74,9 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll True - + False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.4.0-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll @@ -131,12 +132,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Websites/Commands.Websites.Test/Properties/AssemblyInfo.cs index 9b6b215b2461..46dc05123a65 100644 --- a/src/ResourceManager/Websites/Commands.Websites.Test/Properties/AssemblyInfo.cs +++ b/src/ResourceManager/Websites/Commands.Websites.Test/Properties/AssemblyInfo.cs @@ -35,3 +35,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebsitesController.cs b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebsitesController.cs index c4fd2831dec3..a2ada540f1fd 100644 --- a/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebsitesController.cs +++ b/src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebsitesController.cs @@ -27,6 +27,7 @@ using LegacyTest = Microsoft.Azure.Test; using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory; using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities; +using System.IO; namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests { @@ -91,6 +92,7 @@ public void RunPsTestWorkflow( d.Add("Microsoft.Authorization", AuthorizationApiVersion); HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(false, d); + HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); using (MockContext context = MockContext.Start(callingClassType, mockName)) { this.csmTestFactory = new LegacyTest.CSMTestEnvironmentFactory(); diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/packages.config b/src/ResourceManager/Websites/Commands.Websites.Test/packages.config index 6e5f5429d236..d74426bfa619 100644 --- a/src/ResourceManager/Websites/Commands.Websites.Test/packages.config +++ b/src/ResourceManager/Websites/Commands.Websites.Test/packages.config @@ -8,7 +8,7 @@ - + @@ -21,7 +21,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Websites/WebSites.sln b/src/ResourceManager/Websites/WebSites.sln index 524f2c8705f0..e9c3057d83e7 100644 --- a/src/ResourceManager/Websites/WebSites.sln +++ b/src/ResourceManager/Websites/WebSites.sln @@ -22,11 +22,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Co EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{C5A93E47-40AD-43C3-A08C-29B7485F4C8B}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ServiceManagement/.nuget/packages.config b/src/ServiceManagement/.nuget/packages.config deleted file mode 100644 index 091917678945..000000000000 --- a/src/ServiceManagement/.nuget/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj b/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj index d7ad7f09a6d6..9c36c7630f16 100644 --- a/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj @@ -1,6 +1,7 @@  - + + Debug AnyCPU @@ -18,8 +19,7 @@ ..\..\..\ true - - + 5b56844e true @@ -68,7 +68,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -125,6 +125,22 @@ ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True + diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs index 1176996557a5..c93f04a91fa6 100644 --- a/src/ServiceManagement/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs @@ -15,6 +15,7 @@ using System; using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -45,3 +46,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] [assembly: CLSCompliant(false)] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config b/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config index c62dcf943ceb..579b7b14150a 100644 --- a/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config @@ -5,7 +5,7 @@ - + @@ -16,5 +16,11 @@ - + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Common/Commands.Common.Test/Commands.Common.Test.csproj b/src/ServiceManagement/Common/Commands.Common.Test/Commands.Common.Test.csproj index 1320be72792c..3d78379a4325 100644 --- a/src/ServiceManagement/Common/Commands.Common.Test/Commands.Common.Test.csproj +++ b/src/ServiceManagement/Common/Commands.Common.Test/Commands.Common.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -16,7 +17,7 @@ ..\..\..\ true {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 9ff8fb41 + 167c4c74 true @@ -71,12 +72,12 @@ False ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - + False - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -168,12 +169,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ServiceManagement/Common/Commands.Common.Test/Common/Testing.cs b/src/ServiceManagement/Common/Commands.Common.Test/Common/Testing.cs index aa441770f3d4..002175ca8ecd 100644 --- a/src/ServiceManagement/Common/Commands.Common.Test/Common/Testing.cs +++ b/src/ServiceManagement/Common/Commands.Common.Test/Common/Testing.cs @@ -88,7 +88,7 @@ public static void AssertThrows(Action action, string expectedMessage) /// Path to the resource. public static string GetAssemblyTestResourcePath(string relativePath) { - string path = Path.Combine(Environment.CurrentDirectory, relativePath); + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, relativePath); try { EmbeddedFileWriter.WriteResourceToDisk(relativePath, path); diff --git a/src/ServiceManagement/Common/Commands.Common.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Common/Commands.Common.Test/Properties/AssemblyInfo.cs index 354be543b44b..6f2349821748 100644 --- a/src/ServiceManagement/Common/Commands.Common.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/Common/Commands.Common.Test/Properties/AssemblyInfo.cs @@ -28,6 +28,7 @@ [assembly: Guid("080bc9b8-3c00-4d0e-bec2-38d2fd0d7061")] [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] #if SIGN [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] diff --git a/src/ServiceManagement/Common/Commands.Common.Test/packages.config b/src/ServiceManagement/Common/Commands.Common.Test/packages.config index 6bf38e990c1c..44802be0be42 100644 --- a/src/ServiceManagement/Common/Commands.Common.Test/packages.config +++ b/src/ServiceManagement/Common/Commands.Common.Test/packages.config @@ -6,8 +6,8 @@ - - + + @@ -26,8 +26,11 @@ - - - - + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj b/src/ServiceManagement/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj index ad81f675f239..3165458525e8 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -16,7 +17,7 @@ {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} ..\..\..\ true - fd20f8bd + af45439e true @@ -62,10 +63,10 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -166,12 +167,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Common/PowerShellTest.cs b/src/ServiceManagement/Common/Commands.ScenarioTest/Common/PowerShellTest.cs index 20ff0087ded7..58adba721dd6 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Common/PowerShellTest.cs +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Common/PowerShellTest.cs @@ -96,6 +96,7 @@ public virtual void TestSetup() { powershell = System.Management.Automation.PowerShell.Create(); + powershell.AddScript("$error.clear()"); foreach (string moduleName in modules) { powershell.AddScript(string.Format("Import-Module \"{0}\"", Test.Utilities.Common.Testing.GetAssemblyTestResourcePath(moduleName))); diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs b/src/ServiceManagement/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs index 914cefc0ccb6..6690b5a08568 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs @@ -67,13 +67,13 @@ public class ServiceManagementTestEnvironmentFactory : TestEnvironmentFactory /// /// Get certificate test credentials and target management URI from environment variables /// - /// A test environment containg credentials and target URI, or null if no environment is found + /// A test environment containing credentials and target URI, or null if no environment is found protected virtual TestEnvironment GetCertificateTestEnvironment() { TestEnvironment environment = null; string testConnectionString = Environment.GetEnvironmentVariable(TestCertificateConnectionStringKey); string testPublishSettingsString = Environment.GetEnvironmentVariable(TestPublishSettingsFileKey); - string defaultPublishSettingsFile = Path.Combine(Environment.CurrentDirectory, DefaultPublishsettingsFilename); + string defaultPublishSettingsFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, DefaultPublishsettingsFilename); if (File.Exists(defaultPublishSettingsFile)) { TracingAdapter.Information("Getting credentials from local publishsettings file: {0}", defaultPublishSettingsFile); diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs b/src/ServiceManagement/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs index 6d35bafe9d2c..f7483fb94c7a 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs @@ -235,7 +235,7 @@ private static void EnsureTokenCreationEnvironment() { if (!TokenCreationEnvironmentInitialized()) { - string zipFilePath = Path.Combine(Environment.CurrentDirectory, Path.GetFileNameWithoutExtension(Path.GetTempFileName()) + ".zip"); + string zipFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Path.GetFileNameWithoutExtension(Path.GetTempFileName()) + ".zip"); CopyResourceToFile(TokenCreationResourceName, zipFilePath); ExtractZipFile(zipFilePath, JsTokenCodeLocation); } diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Common/WindowsAzurePowerShellCertificateTest.cs b/src/ServiceManagement/Common/Commands.ScenarioTest/Common/WindowsAzurePowerShellCertificateTest.cs index 75563d7c58bd..3b221e0cab27 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Common/WindowsAzurePowerShellCertificateTest.cs +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Common/WindowsAzurePowerShellCertificateTest.cs @@ -52,7 +52,7 @@ public AzurePowerShellCertificateTest(params string[] modules) if (this.runningMocked) { AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(); - string dummyCredentialFile = Path.Combine(Environment.CurrentDirectory, TestCredentialHelper.DefaultCredentialFile); + string dummyCredentialFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, TestCredentialHelper.DefaultCredentialFile); if (!File.Exists(dummyCredentialFile)) { AzureSession.DataStore.WriteFile(dummyCredentialFile, Properties.Resources.RdfeTestDummy); @@ -61,7 +61,7 @@ public AzurePowerShellCertificateTest(params string[] modules) } else { - this.credentials = new TestCredentialHelper(Environment.CurrentDirectory); + this.credentials = new TestCredentialHelper(AppDomain.CurrentDomain.BaseDirectory); this.credentialFile = TestCredentialHelper.DefaultCredentialFile; this.profileFile = TestCredentialHelper.WindowsAzureProfileFile; } diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/CredentialTests/CredentialTestHelper.cs b/src/ServiceManagement/Common/Commands.ScenarioTest/CredentialTests/CredentialTestHelper.cs index ec37c894bf45..e934e754a4f1 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/CredentialTests/CredentialTestHelper.cs +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/CredentialTests/CredentialTestHelper.cs @@ -21,6 +21,7 @@ using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.Azure.Common.Authentication; using Microsoft.Azure.Common.Authentication.Models; +using System.IO; namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CredentialTests { @@ -98,13 +99,18 @@ public virtual Collection RunPowerShellTest(params string[] scripts) private void SetupPowerShellModules(System.Management.Automation.PowerShell powershell) { - powershell.AddScript(string.Format("cd \"{0}\"", Environment.CurrentDirectory)); + powershell.AddScript("$error.clear()"); + powershell.AddScript(string.Format("cd \"{0}\"", AppDomain.CurrentDomain.BaseDirectory)); foreach (string moduleName in modules) { - powershell.AddScript(string.Format("Import-Module \".\\{0}\"", moduleName)); + powershell.AddScript(string.Format("Import-Module \"{0}\"", + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, moduleName))); } + powershell.AddScript( + string.Format(@"set-location {0}", AppDomain.CurrentDomain.BaseDirectory)); + powershell.AddScript(string.Format(@"$TestOutputRoot='{0}'", AppDomain.CurrentDomain.BaseDirectory)); powershell.AddScript("$VerbosePreference='Continue'"); powershell.AddScript("$DebugPreference='Continue'"); powershell.AddScript("$ErrorActionPreference='Stop'"); diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Properties/AssemblyInfo.cs b/src/ServiceManagement/Common/Commands.ScenarioTest/Properties/AssemblyInfo.cs index 0aebc980b6f5..be66e340964e 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Properties/AssemblyInfo.cs @@ -43,3 +43,4 @@ // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/DiagnosticsExtension/DiagnosticsExtensionTests.ps1 b/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/DiagnosticsExtension/DiagnosticsExtensionTests.ps1 index 0606cf305157..a5b3e4891825 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/DiagnosticsExtension/DiagnosticsExtensionTests.ps1 +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/DiagnosticsExtension/DiagnosticsExtensionTests.ps1 @@ -22,20 +22,20 @@ function Test-AzureServiceDiagnosticsExtensionBasic $testMode = Get-ComputeTestMode; if ($testMode.ToLower() -ne 'playback') { - $cscpkg = '.\Resources\ServiceManagement\Files\OneWebOneWorker.cspkg'; + $cscpkg = "$TestOutputRoot\Resources\ServiceManagement\Files\OneWebOneWorker.cspkg"; } else { $cscpkg = "https://${storageName}.blob.azure.windows.net/blob/OneWebOneWorker.cspkg"; } - $cscfg = '.\Resources\ServiceManagement\Files\OneWebOneWorker.cscfg' + $cscfg = "$TestOutputRoot\Resources\ServiceManagement\Files\OneWebOneWorker.cscfg" New-AzureService -ServiceName $svcName -Location $location New-AzureDeployment -ServiceName $svcName -Slot Production -Package $cscpkg -Configuration $cscfg $extension = Get-AzureServiceDiagnosticsExtension -ServiceName $svcName Assert-Null $extension "The default deployment shouldn't have diagnostics extension enabled" - $configFilePath = '.\Resources\DiagnosticsExtension\Files\CloudServiceConfig.xml' + $configFilePath = "$TestOutputRoot\Resources\DiagnosticsExtension\Files\CloudServiceConfig.xml" Set-AzureServiceDiagnosticsExtension -ServiceName $svcName -StorageAccountName $storageName -DiagnosticsConfigurationPath $configFilePath $extension = Get-AzureServiceDiagnosticsExtension -ServiceName $svcName Assert-NotNull $extension "Diagnostics extension should be enabled" @@ -79,20 +79,20 @@ function Test-AzureServiceDiagnosticsExtensionConfigurationArray $testMode = Get-ComputeTestMode; if ($testMode.ToLower() -ne 'playback') { - $cscpkg = '.\Resources\ServiceManagement\Files\OneWebOneWorker.cspkg'; + $cscpkg = "$TestOutputRoot\Resources\ServiceManagement\Files\OneWebOneWorker.cspkg"; } else { $cscpkg = "https://${storageName}.blob.azure.windows.net/blob/OneWebOneWorker.cspkg"; } - $cscfg = '.\Resources\ServiceManagement\Files\OneWebOneWorker.cscfg' + $cscfg = "$TestOutputRoot\Resources\ServiceManagement\Files\OneWebOneWorker.cscfg" New-AzureService -ServiceName $svcName -Location $location New-AzureDeployment -ServiceName $svcName -Slot Production -Package $cscpkg -Configuration $cscfg - $xmlConfig = '.\Resources\DiagnosticsExtension\Files\CloudServiceConfig.xml' + $xmlConfig = "$TestOutputRoot\Resources\DiagnosticsExtension\Files\CloudServiceConfig.xml" $workerRoleConfig = New-AzureServiceDiagnosticsExtensionConfig -Role "WorkerRole1" -StorageAccountName $storageName -DiagnosticsConfigurationPath $xmlConfig - $wadcfgxConfig = '.\Resources\DiagnosticsExtension\Files\diagnostics.wadcfgx' + $wadcfgxConfig = "$TestOutputRoot\Resources\DiagnosticsExtension\Files\diagnostics.wadcfgx" $webRoleConfig = New-AzureServiceDiagnosticsExtensionConfig -Role "WebRole1" -StorageAccountName $storageName -DiagnosticsConfigurationPath $wadcfgxConfig Set-AzureServiceDiagnosticsExtension -ServiceName $svcName -DiagnosticsConfiguration @($workerRoleConfig, $webRoleConfig) diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/RemoteApp/RemoteAppCI_Test.ps1 b/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/RemoteApp/RemoteAppCI_Test.ps1 index 597728053050..c9aff306d4ce 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/RemoteApp/RemoteAppCI_Test.ps1 +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/RemoteApp/RemoteAppCI_Test.ps1 @@ -71,7 +71,10 @@ function CreateCloudCollection([string] $Collection) do { Write-Verbose "Waiting current time: $(Get-Date)" - sleep -Seconds (PollingInterval) + + if ($env:AZURE_TEST_MODE -eq "Record"){ + sleep -Seconds (PollingInterval) + } $collectionState = Get-AzureRemoteAppOperationResult -TrackingId $trackIdCollection.TrackingId -ErrorAction SilentlyContinue -ErrorVariable er if ($? -eq $false) @@ -205,7 +208,9 @@ function UnpublishRemoteApplications([string] $Collection, [string[]] $applicati } } - Sleep 60 # seconds + if ($env:AZURE_TEST_MODE -eq "Record"){ + Sleep 60 # seconds + } $remainingApps = Get-AzureRemoteAppProgram $Collection | % Alias $failedToUnpublish = $remainingApps | ? {$applications -contains $_} @@ -224,8 +229,9 @@ function DeleteRemoteAppCollection([string] $Collection) do { Write-Verbose "Waiting current time: $(Get-Date)" - sleep -Seconds (PollingInterval) - + if ($env:AZURE_TEST_MODE -eq "Record"){ + sleep -Seconds (PollingInterval) + } $collectionState = Get-AzureRemoteAppOperationResult -TrackingId $trackIdCollection.TrackingId -ErrorAction SilentlyContinue -ErrorVariable er if ($? -eq $false) { diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/Scaffolding.ps1 b/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/Scaffolding.ps1 index d34bf070f235..d3782b38840a 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/Scaffolding.ps1 +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/Scaffolding.ps1 @@ -12,12 +12,12 @@ # limitations under the License. # ---------------------------------------------------------------------------------- -.".\Common.ps1" +."$TestOutputRoot\Common.ps1" -$CloudConfig=".\ServiceConfiguration.Cloud.cscfg" -$LocalConfig=".\ServiceConfiguration.Local.cscfg" -$ServiceDefinition=".\ServiceDefinition.csdef" -$DeploymentSettings=".\DeploymentSettings.json" +$CloudConfig="$TestOutputRoot\ServiceConfiguration.Cloud.cscfg" +$LocalConfig="$TestOutputRoot\ServiceConfiguration.Local.cscfg" +$ServiceDefinition="$TestOutputRoot\ServiceDefinition.csdef" +$DeploymentSettings="$TestOutputRoot\DeploymentSettings.json" function Create-Service { diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/ServiceManagement/ServiceManagementTests.ps1 b/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/ServiceManagement/ServiceManagementTests.ps1 index 23cf0b93cfe7..5b830146bf99 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/ServiceManagement/ServiceManagementTests.ps1 +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Resources/ServiceManagement/ServiceManagementTests.ps1 @@ -411,7 +411,7 @@ function Run-AutoGeneratedServiceExtensionCmdletTests { $cspkg = "https://${storageName}.blob.azure.windows.net/blob/OneWebOneWorker.cspkg"; } - $cscfg = '.\Resources\ServiceManagement\Files\OneWebOneWorker.cscfg'; + $cscfg = "$TestOutputRoot\Resources\ServiceManagement\Files\OneWebOneWorker.cscfg"; $st = New-AzureDeployment -ServiceName $svcName -Package $cspkg -Configuration $cscfg -Label $svcName -Slot Production; @@ -500,7 +500,7 @@ function Run-ServiceExtensionSetCmdletTests { $cspkg = "https://${storageName}.blob.azure.windows.net/blob/OneWebOneWorker.cspkg"; } - $cscfg = '.\Resources\ServiceManagement\Files\OneWebOneWorker.cscfg'; + $cscfg = "$TestOutputRoot\Resources\ServiceManagement\Files\OneWebOneWorker.cscfg"; # Staging 1st $st = New-AzureDeployment -ServiceName $svcName -Package $cspkg -Configuration $cscfg -Label $svcName -Slot Staging; @@ -556,13 +556,13 @@ function Run-ServiceDeploymentExtensionCmdletTests $testMode = Get-ComputeTestMode; if ($testMode.ToLower() -ne 'playback') { - $cspkg = '.\Resources\ServiceManagement\Files\LongRoleName.Cloud.cspkg'; + $cspkg = "$TestOutputRoot\Resources\ServiceManagement\Files\LongRoleName.Cloud.cspkg"; } else { $cspkg = "https://${storageName}.blob.azure.windows.net/blob/LongRoleName.Cloud.cspkg"; } - $cscfg = '.\Resources\ServiceManagement\Files\LongRoleName.Cloud.cscfg'; + $cscfg = "$TestOutputRoot\Resources\ServiceManagement\Files\LongRoleName.Cloud.cscfg"; $webRoleNameWithSpaces = "WebRole1 With Spaces In Name"; $workerRoleLongName = "Microsoft.Contoso.Department.ProjectCodeName.Worker"; diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/Scheduler/SchedulerTests.cs b/src/ServiceManagement/Common/Commands.ScenarioTest/Scheduler/SchedulerTests.cs index b84d3bf03a14..bf53f66978f2 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/Scheduler/SchedulerTests.cs +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/Scheduler/SchedulerTests.cs @@ -21,6 +21,7 @@ using Microsoft.Azure.Test; using Xunit; using Microsoft.Azure.Common.Authentication; +using System; namespace Microsoft.WindowsAzure.Commands.ScenarioTest { @@ -50,7 +51,7 @@ protected void RunPowerShellTest(params string[] scripts) SetupManagementClients(); - List modules = Directory.GetFiles("Resources\\Scheduler", "*.ps1").ToList(); + List modules = Directory.GetFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources\\Scheduler"), "*.ps1").ToList(); modules.Add("Common.ps1"); modules.Add(@"..\..\..\..\..\Package\Debug\ServiceManagement\Azure\Azure.psd1"); diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/ServiceManagement/ServiceManagementTests.cs b/src/ServiceManagement/Common/Commands.ScenarioTest/ServiceManagement/ServiceManagementTests.cs index 9fe205c03c4d..25dcb7526085 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/ServiceManagement/ServiceManagementTests.cs +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/ServiceManagement/ServiceManagementTests.cs @@ -18,6 +18,7 @@ using Microsoft.WindowsAzure.Management.Compute; using Microsoft.WindowsAzure.Management.Network; using Microsoft.WindowsAzure.Management.Storage; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -51,7 +52,7 @@ protected void RunPowerShellTest(params string[] scripts) SetupManagementClients(); - List modules = Directory.GetFiles(@"Resources\ServiceManagement", "*.ps1").ToList(); + List modules = Directory.GetFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\ServiceManagement"), "*.ps1").ToList(); modules.Add("Common.ps1"); modules.Add(@"..\..\..\..\..\Package\Debug\ServiceManagement\Azure\Azure.psd1"); modules.Add(@"..\..\..\..\..\Package\Debug\ServiceManagement\Azure\Compute\AzurePreview.psd1"); diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/TrafficManagerTests/TrafficManagerTests.cs b/src/ServiceManagement/Common/Commands.ScenarioTest/TrafficManagerTests/TrafficManagerTests.cs index 1db0072aecdf..7e7b3faec9bd 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/TrafficManagerTests/TrafficManagerTests.cs +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/TrafficManagerTests/TrafficManagerTests.cs @@ -21,6 +21,7 @@ using Microsoft.Azure.Test; using Xunit; using Microsoft.Azure.Common.Authentication; +using System; namespace Microsoft.WindowsAzure.Commands.ScenarioTest { @@ -272,7 +273,7 @@ protected void RunPowerShellTest(params string[] scripts) SetupManagementClients(); - List modules = Directory.GetFiles("Resources\\TrafficManager", "*.ps1").ToList(); + List modules = Directory.GetFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources\\TrafficManager"), "*.ps1").ToList(); modules.Add("Common.ps1"); modules.Add(@"..\..\..\..\..\Package\Debug\ServiceManagement\Azure\Azure.psd1"); diff --git a/src/ServiceManagement/Common/Commands.ScenarioTest/packages.config b/src/ServiceManagement/Common/Commands.ScenarioTest/packages.config index 15923f5ea852..b2f9859a5063 100644 --- a/src/ServiceManagement/Common/Commands.ScenarioTest/packages.config +++ b/src/ServiceManagement/Common/Commands.ScenarioTest/packages.config @@ -6,8 +6,8 @@ - - + + @@ -27,7 +27,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj index 79de3cc82f3d..8098de2f3561 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj @@ -1,6 +1,7 @@  - + + Debug AnyCPU @@ -20,8 +21,7 @@ ..\..\..\ true - - + 3d690ed1 true @@ -78,7 +78,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -180,12 +180,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True @@ -459,7 +467,7 @@ - + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs index 9f9e373fade5..8790838b0959 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs @@ -138,7 +138,7 @@ public static void GetTestSettings(string testSettings) { case "UseDefaults": default: - CredentialHelper.GetCredentialInfo(Environment.CurrentDirectory); + CredentialHelper.GetCredentialInfo(AppDomain.CurrentDomain.BaseDirectory); break; case "UseCustom": @@ -166,7 +166,7 @@ public static void GetTestSettings(string testSettings) break; case "UseDefaultsandOverride": - CredentialHelper.GetCredentialInfo(Environment.CurrentDirectory); + CredentialHelper.GetCredentialInfo(AppDomain.CurrentDomain.BaseDirectory); if (!string.IsNullOrWhiteSpace(Resource.PublishSettingsFile)) { diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/GenericIaaSExtensionTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/GenericIaaSExtensionTests.cs index cac90f1d6021..806e94a93ca4 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/GenericIaaSExtensionTests.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/GenericIaaSExtensionTests.cs @@ -63,7 +63,7 @@ public void TestIntialize() testStartTime = DateTime.Now; GetVmAccessConfiguration(); referenceName = Utilities.GetUniqueShortName(referenceNamePrefix); - localPath = Path.Combine(Environment.CurrentDirectory, serviceName + ".xml").ToString(); + localPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, serviceName + ".xml").ToString(); } [TestCleanup] diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Utilities.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Utilities.cs index 8aa9a6b6e42b..9dd11d59db51 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Utilities.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Utilities.cs @@ -39,8 +39,8 @@ internal class Utilities { #region Constants - public static string windowsAzurePowershellPath = Path.Combine(Environment.CurrentDirectory, "ServiceManagement\\Azure"); - public static string windowsAzurePowershellDefaultPath = Environment.CurrentDirectory; + public static string windowsAzurePowershellPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ServiceManagement\\Azure"); + public static string windowsAzurePowershellDefaultPath = AppDomain.CurrentDomain.BaseDirectory; public const string windowsAzurePowershellServiceModule = "Azure.psd1"; public const string AzurePowershellModuleServiceManagementPirModule = "Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll"; diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/AssemblyInfo.cs index 9b023aef322d..4bcfd1404ee7 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -34,6 +35,7 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] #if SIGN [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ScenarioTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config index d352f0160a3c..ce352f6bc6b0 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config @@ -7,7 +7,7 @@ - + @@ -27,7 +27,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj index 2563f3420a8e..8ea002a154e4 100644 --- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\..\..\ true - 86879738 + 440b7605 true @@ -69,7 +70,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -177,12 +178,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True @@ -311,4 +320,4 @@ - + \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetJobOutputCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetJobOutputCommandTests.cs index 1cb18b765790..96fb0d3a0cde 100644 --- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetJobOutputCommandTests.cs +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetJobOutputCommandTests.cs @@ -104,7 +104,7 @@ public void CanGetTaskLogsForCompletedJob() getJobsCommand.EndProcessing(); AzureHDInsightJob jobWithStatusDirectory = getJobsCommand.Output.First(j => !string.IsNullOrEmpty(j.StatusDirectory)); - string logDirectoryPath = Path.Combine(System.Environment.CurrentDirectory, Guid.NewGuid().ToString()); + string logDirectoryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Guid.NewGuid().ToString()); IGetAzureHDInsightJobOutputCommand getJobOutputCommand = ServiceLocator.Instance.Locate().CreateGetJobOutput(); getJobOutputCommand.CurrentSubscription = GetCurrentSubscription(); diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs index a3bacfd5f78e..26583e5e55d2 100644 --- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs @@ -46,3 +46,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] [assembly: CLSCompliant(false)] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config index dbdb938e91e8..0d4ca00308b3 100644 --- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config @@ -7,7 +7,7 @@ - + @@ -26,7 +26,11 @@ - - - + + + + + + + diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj index a746214d7f34..caf2aed61978 100644 --- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\..\..\ true - ea4efacb + b1046e6d bin\Release\ @@ -58,10 +59,10 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll @@ -139,12 +140,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Properties/AssemblyInfo.cs index fd3d55c354ba..70a8924a95b9 100644 --- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Properties/AssemblyInfo.cs @@ -27,3 +27,4 @@ [assembly: Guid("3E5D3114-DEBB-4DC2-BB9D-CF2A2707F74D")] [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config index 4be7cc327051..3536371b2b3a 100644 --- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config @@ -5,8 +5,8 @@ - - + + @@ -21,7 +21,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj b/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj index 4f1f11b0c6ff..8fa868866d7b 100644 --- a/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj +++ b/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\..\..\ true - 395702f1 + b990439b bin\Release\ @@ -58,10 +59,10 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll @@ -109,7 +110,7 @@ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.5.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll - ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll + ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll False @@ -150,12 +151,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True @@ -185,7 +194,7 @@ - + diff --git a/src/ServiceManagement/Network/Commands.Network.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Network/Commands.Network.Test/Properties/AssemblyInfo.cs index 8625a1cfe827..c9d2d6e67213 100644 --- a/src/ServiceManagement/Network/Commands.Network.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/Network/Commands.Network.Test/Properties/AssemblyInfo.cs @@ -27,3 +27,4 @@ [assembly: Guid("3E5D3114-DEBB-4DC2-BB9D-CF2A2707F74D")] [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/MultiVip/MultiVip.cs b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/MultiVip/MultiVip.cs index d62de0f1ba0b..bc889943dc0d 100644 --- a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/MultiVip/MultiVip.cs +++ b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/MultiVip/MultiVip.cs @@ -22,6 +22,7 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Test.Scenari using Microsoft.WindowsAzure.Management.Compute; using Microsoft.WindowsAzure.Management.Network; using Microsoft.WindowsAzure.Management.Storage; + using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -80,8 +81,8 @@ protected void RunPowerShellTest(params string[] scripts) { context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); - List modules = Directory.GetFiles("ScenarioTests\\MultiVip", "*.ps1").ToList(); - modules.AddRange(Directory.GetFiles("ScenarioTests", "*.ps1")); + List modules = Directory.GetFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScenarioTests\\MultiVip"), "*.ps1").ToList(); + modules.AddRange(Directory.GetFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScenarioTests"), "*.ps1")); modules.Add("Common.ps1"); SetupManagementClients(); diff --git a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/NSGScenarioTests.cs b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/NSGScenarioTests.cs index 5b0dbbfae2a9..0afffc8becfd 100644 --- a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/NSGScenarioTests.cs +++ b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/NSGScenarioTests.cs @@ -25,6 +25,7 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Test.Scenari using Microsoft.WindowsAzure.Management; using Microsoft.Azure.Common.Authentication; using Microsoft.Azure.Test; + using System; public class NSGScenarioTests { @@ -132,8 +133,8 @@ protected void RunPowerShellTest(params string[] scripts) { context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); - List modules = Directory.GetFiles("ScenarioTests\\NetworkSecurityGroup", "*.ps1").ToList(); - modules.AddRange(Directory.GetFiles("ScenarioTests", "*.ps1")); + List modules = Directory.GetFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScenarioTests\\NetworkSecurityGroup"), "*.ps1").ToList(); + modules.AddRange(Directory.GetFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScenarioTests"), "*.ps1")); modules.Add("Common.ps1"); SetupManagementClients(); diff --git a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/ReservedIPs/ReservedIP.cs b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/ReservedIPs/ReservedIP.cs index a22c9c3cd10c..2556c1dcad61 100644 --- a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/ReservedIPs/ReservedIP.cs +++ b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/ReservedIPs/ReservedIP.cs @@ -19,9 +19,11 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Test.Scenari { using Microsoft.Azure.Common.Authentication; using Microsoft.Azure.Test; + using Microsoft.Azure.Test.HttpRecorder; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Microsoft.WindowsAzure.Management; using Microsoft.WindowsAzure.Management.Network; + using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -83,12 +85,13 @@ protected void SetupManagementClients() protected void RunPowerShellTest(params string[] scripts) { + HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); using (UndoContext context = UndoContext.Current) { context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); - List modules = Directory.GetFiles("ScenarioTests\\ReservedIPs", "*.ps1").ToList(); - modules.AddRange(Directory.GetFiles("ScenarioTests", "*.ps1")); + List modules = Directory.GetFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScenarioTests\\ReservedIPs"), "*.ps1").ToList(); + modules.AddRange(Directory.GetFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"ScenarioTests"), "*.ps1")); modules.Add("Common.ps1"); SetupManagementClients(); diff --git a/src/ServiceManagement/Network/Commands.Network.Test/packages.config b/src/ServiceManagement/Network/Commands.Network.Test/packages.config index c9e27783befb..7b478089d4b7 100644 --- a/src/ServiceManagement/Network/Commands.Network.Test/packages.config +++ b/src/ServiceManagement/Network/Commands.Network.Test/packages.config @@ -5,8 +5,8 @@ - - + + @@ -24,7 +24,11 @@ - - - + + + + + + + diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj index ce15284e9568..7d125a47c65f 100644 --- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,7 +16,7 @@ ..\..\..\ true - f6a1458e + 9a889278 true @@ -55,10 +56,10 @@ ..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -119,12 +120,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Properties/AssemblyInfo.cs index 0ec4432b6051..5ce07850c86b 100644 --- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Properties/AssemblyInfo.cs @@ -49,3 +49,4 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 index 7dcb3c0c6f52..8693577d3886 100644 --- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 @@ -1216,7 +1216,7 @@ function WaitForCanFailover $count = 20 do { - Start-Sleep 5 + Wait-Seconds 5 $pes = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainerId $pcId; $count = $count -1; @@ -1242,7 +1242,7 @@ function WaitForJobCompletion $interval = 5; do { - Start-Sleep $interval + Wait-Seconds $interval $timeElapse = $timeElapse + $interval $job = Get-AzureSiteRecoveryJob -Id $JobId; } while((-not ($endStateDescription -ccontains $job.State)) -and ($timeElapse -lt $NumOfSecondsToWait)) diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs index d4efb21383fa..309711d9e1f9 100644 --- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs @@ -46,7 +46,9 @@ protected RecoveryServicesTestsBase() { if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("VAULT_SETTINGS_FILE_PATH"))) { - Environment.SetEnvironmentVariable("VAULT_SETTINGS_FILE_PATH", "ScenarioTests\\vaultSettings.vaultcredentials"); + Environment.SetEnvironmentVariable( + "VAULT_SETTINGS_FILE_PATH", + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ScenarioTests\\vaultSettings.vaultcredentials")); } this.vaultSettingsFilePath = Environment.GetEnvironmentVariable("VAULT_SETTINGS_FILE_PATH"); diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config index 4aab3c6aac4e..846cfa003038 100644 --- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config @@ -6,8 +6,8 @@ - - + + @@ -17,7 +17,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Commands.RemoteAppScenarioTest.csproj b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Commands.RemoteAppScenarioTest.csproj index de36e914661e..171d004d74ac 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Commands.RemoteAppScenarioTest.csproj +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Commands.RemoteAppScenarioTest.csproj @@ -41,65 +41,91 @@ ..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll - False ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.6.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll + True - + False ..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5571.32271-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + + + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + True - False ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + True - + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + True ..\..\..\packages\Microsoft.Rest.ClientRuntime.1.8.2\lib\net45\Microsoft.Rest.ClientRuntime.dll + True ..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.0.11.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll + True False ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll - + + False ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll - + + False ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll - + + ..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.4\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll + + + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll False + + ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll - - - False - ..\..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll - + + + - - ..\..\..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll - - ..\..\..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll - - - - - - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True @@ -115,6 +141,7 @@ + PreserveNewest diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Scripts/RemoteAppCI_Test.ps1 b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Scripts/RemoteAppCI_Test.ps1 index f3da3f38ce72..13f3693fb8ec 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Scripts/RemoteAppCI_Test.ps1 +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/Scripts/RemoteAppCI_Test.ps1 @@ -70,8 +70,9 @@ function CreateCloudCollection([string] $Collection) do { Write-Verbose "Waiting current time: $(Get-Date)" - sleep -Seconds (PollingInterval) - + if ($env:AZURE_TEST_MODE -eq "Record"){ + sleep -Seconds (PollingInterval) + } $collectionState = Get-AzureRemoteAppOperationResult -TrackingId $trackIdCollection.TrackingId -ErrorAction SilentlyContinue -ErrorVariable er if ($? -eq $false) { @@ -204,7 +205,9 @@ function UnpublishRemoteApplications([string] $Collection, [string[]] $applicati } } - Sleep 60 # seconds + if ($env:AZURE_TEST_MODE -eq "Record"){ + Sleep 60 # seconds + } $remainingApps = Get-AzureRemoteAppProgram $Collection | % Alias $failedToUnpublish = $remainingApps | ? {$applications -contains $_} @@ -223,8 +226,9 @@ function DeleteRemoteAppCollection([string] $Collection) do { Write-Verbose "Waiting current time: $(Get-Date)" - sleep -Seconds (PollingInterval) - + if ($env:AZURE_TEST_MODE -eq "Record"){ + sleep -Seconds (PollingInterval) + } $collectionState = Get-AzureRemoteAppOperationResult -TrackingId $trackIdCollection.TrackingId -ErrorAction SilentlyContinue -ErrorVariable er if ($? -eq $false) { diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/packages.config b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/packages.config new file mode 100644 index 000000000000..b2f9859a5063 --- /dev/null +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.ScenarioTest/packages.config @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj index cf2491c8bf04..ed9ac76b5623 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -14,7 +15,7 @@ 512 ..\..\..\ true - 44c0d39d + 34871fc7 AnyCPU @@ -110,7 +111,7 @@ ..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -169,12 +170,20 @@ ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config index 44ee0184cc62..d2151893bd25 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config @@ -4,7 +4,7 @@ - + @@ -16,7 +16,11 @@ - - - + + + + + + + diff --git a/src/ServiceManagement/ServiceManagement.sln b/src/ServiceManagement/ServiceManagement.sln index fcaa8036798f..ed51ed30b1ea 100644 --- a/src/ServiceManagement/ServiceManagement.sln +++ b/src/ServiceManagement/ServiceManagement.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +VisualStudioVersion = 12.0.40629.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8531411A-0137-4E27-9C5E-49E07C245048}" ProjectSection(SolutionItems) = preProject @@ -88,7 +88,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Network.Test", "Network\Commands.Network.Test\Commands.ServiceManagement.Network.Test.csproj", "{FDB897BD-FCB4-44A1-8D66-AC99F22EC737}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RecoveryServices", "RecoveryServices\Commands.RecoveryServices\Commands.RecoveryServicesRdfe.csproj", "{98B10548-DF97-4FB1-8D82-2A12945D4F21}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RecoveryServicesRdfe", "RecoveryServices\Commands.RecoveryServices\Commands.RecoveryServicesRdfe.csproj", "{98B10548-DF97-4FB1-8D82-2A12945D4F21}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RecoveryServices.Test", "RecoveryServices\Commands.RecoveryServices.Test\Commands.RecoveryServices.Test.csproj", "{A415F75B-EB6A-49A6-934E-5BA71B83D6EB}" EndProject @@ -106,10 +106,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.StorSimple.Test", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Common", "Common\Commands.ServiceManagement.Common\Commands.ServiceManagement.Common.csproj", "{CFF09E81-1E31-444E-B4D4-A21E946C29E2}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{1059B990-B1E2-4846-B1B2-8663F11CBDE3}" - ProjectSection(SolutionItems) = preProject - .nuget\packages.config = .nuget\packages.config - EndProjectSection +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RemoteAppScenarioTest", "RemoteApp\Commands.RemoteApp.ScenarioTest\Commands.RemoteAppScenarioTest.csproj", "{C2FA83A2-8668-49DD-A1A0-0359653571CA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -285,6 +282,10 @@ Global {CFF09E81-1E31-444E-B4D4-A21E946C29E2}.Debug|Any CPU.Build.0 = Debug|Any CPU {CFF09E81-1E31-444E-B4D4-A21E946C29E2}.Release|Any CPU.ActiveCfg = Release|Any CPU {CFF09E81-1E31-444E-B4D4-A21E946C29E2}.Release|Any CPU.Build.0 = Release|Any CPU + {C2FA83A2-8668-49DD-A1A0-0359653571CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2FA83A2-8668-49DD-A1A0-0359653571CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2FA83A2-8668-49DD-A1A0-0359653571CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2FA83A2-8668-49DD-A1A0-0359653571CA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -310,5 +311,6 @@ Global {CA82D500-1940-4068-A076-D7A8AD459FB0} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} {C1BDA476-A5CC-4394-914D-48B0EC31A710} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} {0FA676D5-1349-4086-B33F-65EC2CB7DA41} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {C2FA83A2-8668-49DD-A1A0-0359653571CA} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} EndGlobalSection EndGlobal diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj index 21b4fa4c1299..ce17c70498e7 100644 --- a/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -16,8 +17,7 @@ ..\..\..\ true /assemblyCompareMode:StrongNameIgnoringVersion - - + 4bd0edfb true @@ -131,6 +131,22 @@ + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True + diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs index 1e9e2f94ec32..a6bacf471860 100644 --- a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs @@ -50,13 +50,7 @@ public class FileSystemHelper : IDisposable /// Monitors changes to the file system. /// private FileSystemWatcher _watcher = null; - - /// - /// The previous Environment.CurrentDirectory which is cached so it can - /// be restored on disposal. - /// - private string _previousDirectory = null; - + /// /// Gets or sets a value indicating whether to enable monitoring on /// the portion of the file system being managed by FileSystemHelper. @@ -144,15 +138,13 @@ protected virtual void Dispose(bool disposing) AzureSdkPath = null; } - - // Restore the previous CurrentDirectory - if (_previousDirectory != null) + + Log("Deleting directory {0}", RootPath); + try { - Environment.CurrentDirectory = _previousDirectory; + FileUtilities.DataStore.DeleteDirectory(RootPath); } - - Log("Deleting directory {0}", RootPath); - FileUtilities.DataStore.DeleteDirectory(RootPath); + catch { } DisposeWatcher(); @@ -215,7 +207,7 @@ public string GetFullPath(string relativePath) /// /// Create a random directory name that doesn't yet exist on disk. /// - /// A random, non-existant directory name. + /// A random, non-existent directory name. public static string GetTemporaryDirectoryName() { string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); @@ -306,9 +298,7 @@ public string CreateNewService(string serviceName) { CloudServiceProject newService = new CloudServiceProject(RootPath, serviceName, FileUtilities.GetContentFilePath(@"..\..\..\..\..\Package\Debug\ServiceManagement\Azure\Services")); string path = Path.Combine(RootPath, serviceName); - _previousDirectory = Environment.CurrentDirectory; - Environment.CurrentDirectory = path; - + TestMockSupport.TestExecutionFolder = path; return path; } @@ -324,8 +314,7 @@ public void CreateDirectoryWithPrebuiltPackage(string packageName, out string pa + "xmlns=\"http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration\" " + "osFamily=\"2\" osVersion=\"*\" />"; FileUtilities.DataStore.WriteFile(configuration, template); - _previousDirectory = Environment.CurrentDirectory; - Environment.CurrentDirectory = RootPath; + TestMockSupport.TestExecutionFolder = RootPath; } } } diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Properties/AssemblyInfo.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Properties/AssemblyInfo.cs index 40648d210f9a..b39c8cb961c5 100644 --- a/src/ServiceManagement/Services/Commands.Test.Utilities/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Properties/AssemblyInfo.cs @@ -16,6 +16,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -45,6 +46,7 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] #if SIGN [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.HDInsight.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config index 52e42c131f19..03b487c9cdc3 100644 --- a/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config @@ -17,5 +17,11 @@ - + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWebRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWebRoleTests.cs index c24e8d09229f..996a404a60d1 100644 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWebRoleTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWebRoleTests.cs @@ -23,6 +23,7 @@ using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Properties; using Microsoft.WindowsAzure.Commands.Common; +using System; namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding { @@ -93,7 +94,7 @@ public void AddAzureWebRoleWillRecreateDeploymentSettings() public void AddAzureWebRoleWithTemplateFolder() { string scaffoldingPath = "MyWebTemplateFolder"; - Directory.CreateDirectory(Path.Combine(System.Environment.CurrentDirectory, scaffoldingPath)); + Directory.CreateDirectory(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, scaffoldingPath)); using (FileSystemHelper files = new FileSystemHelper(this)) { @@ -123,7 +124,7 @@ public void AddAzureWebRoleWithMissingScaffoldXmlFail() { string roleName = "WebRole1"; string serviceName = "AzureService"; - string scaffoldingPath = "TemplateMissingScaffoldXml"; + string scaffoldingPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TemplateMissingScaffoldXml"); if (Directory.Exists(scaffoldingPath)) { Directory.Delete(scaffoldingPath, true); diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWorkerRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWorkerRoleTests.cs index 5af03241a0d6..1a28eac1e3ba 100644 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWorkerRoleTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWorkerRoleTests.cs @@ -23,6 +23,7 @@ using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Properties; using Microsoft.WindowsAzure.Commands.Common; +using System; namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding { @@ -48,8 +49,7 @@ public void AddAzureWorkerRoleProcess() string serviceName = "AzureService"; string rootPath = files.CreateNewService(serviceName); string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreate, rootPath, roleName); - string originalDirectory = Directory.GetCurrentDirectory(); - Directory.SetCurrentDirectory(rootPath); + TestMockSupport.TestExecutionFolder = rootPath; addWorkerCmdlet = new AddAzureWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = roleName }; addWorkerCmdlet.ExecuteCmdlet(); @@ -57,8 +57,6 @@ public void AddAzureWorkerRoleProcess() AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.GeneralScaffolding, Resources.WorkerRole)); Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); - - Directory.SetCurrentDirectory(originalDirectory); } } @@ -72,8 +70,7 @@ public void AddAzureWorkerRoleWillRecreateDeploymentSettings() string rootPath = files.CreateNewService(serviceName); string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreate, rootPath, roleName); string settingsFilePath = Path.Combine(rootPath, Resources.SettingsFileName); - string originalDirectory = Directory.GetCurrentDirectory(); - Directory.SetCurrentDirectory(rootPath); + TestMockSupport.TestExecutionFolder = rootPath; File.Delete(settingsFilePath); Assert.False(File.Exists(settingsFilePath)); addWorkerCmdlet = new AddAzureWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = roleName }; @@ -84,8 +81,6 @@ public void AddAzureWorkerRoleWillRecreateDeploymentSettings() Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); Assert.True(File.Exists(settingsFilePath)); - - Directory.SetCurrentDirectory(originalDirectory); } } @@ -124,7 +119,7 @@ public void AddAzureWorkerRoleWithTemplateFolder() public void AddAzureWorkerRoleWithMissingScaffoldXmlFail() { string scaffoldingPath = "TemplateMissingScaffoldXml"; - Directory.CreateDirectory(Path.Combine(System.Environment.CurrentDirectory, scaffoldingPath)); + Directory.CreateDirectory(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, scaffoldingPath)); using (FileSystemHelper files = new FileSystemHelper(this)) { diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureRoleTemplateTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureRoleTemplateTests.cs index f5bb67e0fefe..cb947951f6a8 100644 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureRoleTemplateTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureRoleTemplateTests.cs @@ -24,6 +24,7 @@ using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Properties; using Microsoft.WindowsAzure.Commands.Common; +using System; namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding { @@ -44,26 +45,36 @@ public NewAzureRoleTemplateTests() [Trait(Category.AcceptanceType, Category.CheckIn)] public void NewAzureRoleTemplateWithWebRole() { - string outputPath = Path.Combine(Directory.GetCurrentDirectory(), "WebRoleTemplate"); + string outputPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "WebRoleTemplate"); + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; addTemplateCmdlet = new NewAzureRoleTemplateCommand() { Web = true, CommandRuntime = mockCommandRuntime }; addTemplateCmdlet.ExecuteCmdlet(); Assert.Equal(outputPath, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.Path)); - Testing.AssertDirectoryIdentical(Path.Combine(Resources.GeneralScaffolding, RoleType.WebRole.ToString()), outputPath); + Testing.AssertDirectoryIdentical( + Path.Combine( + AppDomain.CurrentDomain.BaseDirectory, + Resources.GeneralScaffolding, + RoleType.WebRole.ToString()), outputPath); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void NewAzureRoleTemplateWithWorkerRole() { - string outputPath = Path.Combine(Directory.GetCurrentDirectory(), "WorkerRoleTemplate"); + string outputPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "WorkerRoleTemplate"); + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; addTemplateCmdlet = new NewAzureRoleTemplateCommand() { Worker = true, CommandRuntime = mockCommandRuntime }; addTemplateCmdlet.ExecuteCmdlet(); Assert.Equal(outputPath, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.Path)); - Testing.AssertDirectoryIdentical(Path.Combine(Resources.GeneralScaffolding, RoleType.WorkerRole.ToString()), outputPath); + Testing.AssertDirectoryIdentical( + Path.Combine( + AppDomain.CurrentDomain.BaseDirectory, + Resources.GeneralScaffolding, + RoleType.WorkerRole.ToString()), outputPath); } [Fact] @@ -78,7 +89,12 @@ public void NewAzureRoleTemplateWithOutputPath() addTemplateCmdlet.ExecuteCmdlet(); Assert.Equal(outputPath, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.Path)); - Testing.AssertDirectoryIdentical(Path.Combine(Resources.GeneralScaffolding, RoleType.WorkerRole.ToString()), outputPath); + Testing.AssertDirectoryIdentical( + Path.Combine( + AppDomain.CurrentDomain.BaseDirectory, + Resources.GeneralScaffolding, + RoleType.WorkerRole.ToString()), + outputPath); } } @@ -97,18 +113,20 @@ public void NewAzureRoleTemplateWithDirectoryExists() outputPath, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.Path)); Testing.AssertDirectoryIdentical( - Path.Combine(Resources.GeneralScaffolding, - RoleType.WorkerRole.ToString()), - outputPath); + Path.Combine( + AppDomain.CurrentDomain.BaseDirectory, + Resources.GeneralScaffolding, + RoleType.WorkerRole.ToString()), + outputPath); } } [Fact(Skip = "TODO: Fix SetScaffolding in CloudServiceProject.")] public void NewAzureRoleTemplateWithRunningOutsideDefaultDirectory() { - string outputPath = Path.Combine(Directory.GetCurrentDirectory(), "TestDir", "WebRoleTemplate"); + string outputPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TestDir", "WebRoleTemplate"); addTemplateCmdlet = new NewAzureRoleTemplateCommand() { Web = true, CommandRuntime = mockCommandRuntime }; - string originalDir = Directory.GetCurrentDirectory(); + string originalDir = AppDomain.CurrentDomain.BaseDirectory; Directory.CreateDirectory("TestDir"); Directory.SetCurrentDirectory("TestDir"); diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureServiceTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureServiceTests.cs index ed6ae655a507..87a68d6590e9 100644 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureServiceTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureServiceTests.cs @@ -22,6 +22,7 @@ using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.CloudService; using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding.Cmdlet { @@ -37,6 +38,7 @@ public NewAzureServiceTests() cmdlet = new NewAzureServiceProjectCommand(); mockCommandRuntime = new MockCommandRuntime(); cmdlet.CommandRuntime = mockCommandRuntime; + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; } [Fact] diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureInstancesTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureInstancesTests.cs index 9b52d6cf59a3..bf9ee2fcd41d 100644 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureInstancesTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureInstancesTests.cs @@ -23,6 +23,7 @@ using Microsoft.WindowsAzure.Commands.Utilities.Properties; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; +using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Tests.Cmdlet { @@ -238,54 +239,53 @@ public void SetAzureInstancesProcessTestsCaseInsensitive() [Trait(Category.AcceptanceType, Category.CheckIn)] public void SetAzureServiceProjectRoleWithoutPassingRoleName() { - string originalDirectory = Directory.GetCurrentDirectory(); + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; string serviceName = "AzureService1"; - if (Directory.Exists(serviceName)) + if (Directory.Exists(Path.Combine(TestMockSupport.TestExecutionFolder,serviceName))) { - Directory.Delete(serviceName, true); + Directory.Delete(Path.Combine(TestMockSupport.TestExecutionFolder, serviceName), true); } - CloudServiceProject service = new CloudServiceProject(Directory.GetCurrentDirectory(), serviceName, null); + CloudServiceProject service = new CloudServiceProject(TestMockSupport.TestExecutionFolder, serviceName, null); service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); - Directory.SetCurrentDirectory(Path.Combine(service.Paths.RootPath, "WebRole1")); + TestMockSupport.TestExecutionFolder = Path.Combine(service.Paths.RootPath, "WebRole1"); cmdlet.RoleName = string.Empty; cmdlet.ExecuteCmdlet(); service = new CloudServiceProject(service.Paths.RootPath, null); Assert.Equal("WebRole1", cmdlet.RoleName); - Directory.SetCurrentDirectory(originalDirectory); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void SetAzureServiceProjectRoleInDeepDirectory() { - string originalDirectory = Directory.GetCurrentDirectory(); + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; string serviceName = "AzureService2"; - if (Directory.Exists(serviceName)) + if (Directory.Exists(Path.Combine(TestMockSupport.TestExecutionFolder, serviceName))) { - Directory.Delete(serviceName, true); + Directory.Delete(Path.Combine(TestMockSupport.TestExecutionFolder, serviceName), true); } - CloudServiceProject service = new CloudServiceProject(Directory.GetCurrentDirectory(), serviceName, null); + CloudServiceProject service = new CloudServiceProject(TestMockSupport.TestExecutionFolder, serviceName, null); service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); - Directory.SetCurrentDirectory(Path.Combine(service.Paths.RootPath, "WebRole1", "bin")); + TestMockSupport.TestExecutionFolder = Path.Combine(service.Paths.RootPath, "WebRole1", "bin"); cmdlet.RoleName = string.Empty; cmdlet.ExecuteCmdlet(); service = new CloudServiceProject(service.Paths.RootPath, null); Assert.Equal("WebRole1", cmdlet.RoleName); - Directory.SetCurrentDirectory(originalDirectory); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void SetAzureServiceProjectRoleInServiecRootDirectoryFail() { + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; string serviceName = "AzureService3"; - if (Directory.Exists(serviceName)) + if (Directory.Exists(Path.Combine(TestMockSupport.TestExecutionFolder, serviceName))) { - Directory.Delete(serviceName, true); + Directory.Delete(Path.Combine(TestMockSupport.TestExecutionFolder, serviceName), true); } - CloudServiceProject service = new CloudServiceProject(Directory.GetCurrentDirectory(), serviceName, null); + CloudServiceProject service = new CloudServiceProject(TestMockSupport.TestExecutionFolder, serviceName, null); service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); cmdlet.RoleName = string.Empty; Testing.AssertThrows(() => cmdlet.ExecuteCmdlet(), Resources.CannotFindServiceRoot); diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServiceComponentsTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServiceComponentsTests.cs index d3c346738733..1bb3fdd240d0 100644 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServiceComponentsTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServiceComponentsTests.cs @@ -23,6 +23,7 @@ using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.CloudService; using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities { @@ -43,9 +44,9 @@ public ServiceComponentsTests() public void TestCleanup() { - if (Directory.Exists(serviceName)) - { - Directory.Delete(serviceName, true); + if (Directory.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, serviceName))) + { + Directory.Delete(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, serviceName), true); } } @@ -58,8 +59,11 @@ public void Dispose() [Trait(Category.AcceptanceType, Category.CheckIn)] public void ServiceComponentsTest() { - newServiceCmdlet.NewAzureServiceProcess(Directory.GetCurrentDirectory(), serviceName); - ServiceComponents components = new ServiceComponents(new PowerShellProjectPathInfo(serviceName)); + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; + newServiceCmdlet.NewAzureServiceProcess(TestMockSupport.TestExecutionFolder, serviceName); + ServiceComponents components = new ServiceComponents( + new PowerShellProjectPathInfo( + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, serviceName))); AzureAssert.AreEqualServiceComponents(components); } @@ -83,8 +87,10 @@ public void ServiceComponentsTestNullPathsFail() [Trait(Category.AcceptanceType, Category.CheckIn)] public void ServiceComponentsTestCloudConfigDoesNotExistFail() { - newServiceCmdlet.NewAzureServiceProcess(Directory.GetCurrentDirectory(), serviceName); - PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(serviceName); + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; + newServiceCmdlet.NewAzureServiceProcess(TestMockSupport.TestExecutionFolder, serviceName); + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo( + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, serviceName)); try { @@ -103,8 +109,10 @@ public void ServiceComponentsTestCloudConfigDoesNotExistFail() [Trait(Category.AcceptanceType, Category.CheckIn)] public void ServiceComponentsTestLocalConfigDoesNotExistFail() { - newServiceCmdlet.NewAzureServiceProcess(Directory.GetCurrentDirectory(), serviceName); - PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(serviceName); + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; + newServiceCmdlet.NewAzureServiceProcess(TestMockSupport.TestExecutionFolder, serviceName); + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo( + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, serviceName)); try { @@ -123,8 +131,10 @@ public void ServiceComponentsTestLocalConfigDoesNotExistFail() [Trait(Category.AcceptanceType, Category.CheckIn)] public void ServiceComponentsTestSettingsDoesNotExistFail() { - newServiceCmdlet.NewAzureServiceProcess(Directory.GetCurrentDirectory(), serviceName); - PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(serviceName); + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; + newServiceCmdlet.NewAzureServiceProcess(TestMockSupport.TestExecutionFolder, serviceName); + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo( + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, serviceName)); try { @@ -143,8 +153,10 @@ public void ServiceComponentsTestSettingsDoesNotExistFail() [Trait(Category.AcceptanceType, Category.CheckIn)] public void ServiceComponentsTestDefinitionDoesNotExistFail() { - newServiceCmdlet.NewAzureServiceProcess(Directory.GetCurrentDirectory(), serviceName); - PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(serviceName); + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; + newServiceCmdlet.NewAzureServiceProcess(TestMockSupport.TestExecutionFolder, serviceName); + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo( + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, serviceName)); try { diff --git a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj index aca067a8dad2..94ea0e3f7330 100644 --- a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj +++ b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj @@ -1,6 +1,7 @@  - + + Debug AnyCPU @@ -18,7 +19,7 @@ ..\..\..\ true - 5d02cb73 + cf1c4b56 true @@ -71,11 +72,11 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll False - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll False @@ -192,12 +193,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs b/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs index fd03415daa23..d7db9e0e9164 100644 --- a/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs @@ -54,7 +54,7 @@ public void SetsAzureEnvironment() { Mock commandRuntimeMock = new Mock(); string name = "Katal"; - ProfileClient client = new ProfileClient(new AzureSMProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile))); + ProfileClient client = new ProfileClient(new AzureSMProfile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, AzureSession.ProfileFile))); client.AddOrSetEnvironment(new AzureEnvironment { Name = name }); SetAzureEnvironmentCommand cmdlet = new SetAzureEnvironmentCommand() @@ -68,12 +68,13 @@ public void SetsAzureEnvironment() GalleryEndpoint = "galleryendpoint" }; + cmdlet.Profile = client.Profile; cmdlet.InvokeBeginProcessing(); cmdlet.ExecuteCmdlet(); cmdlet.InvokeEndProcessing(); commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once()); - client = new ProfileClient(new AzureSMProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile))); + client = new ProfileClient(new AzureSMProfile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, AzureSession.ProfileFile))); AzureEnvironment env = client.Profile.Environments["KaTaL"]; Assert.Equal(env.Name.ToLower(), cmdlet.Name.ToLower()); Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl], cmdlet.PublishSettingsFileUrl); diff --git a/src/ServiceManagement/Services/Commands.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Services/Commands.Test/Properties/AssemblyInfo.cs index 7f6803a3d83a..0e3c2b050d08 100644 --- a/src/ServiceManagement/Services/Commands.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/Services/Commands.Test/Properties/AssemblyInfo.cs @@ -29,3 +29,4 @@ // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/PublishAzureWebsiteProjectTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/PublishAzureWebsiteProjectTests.cs index e25383fc0bb9..ae55bd36cbfa 100644 --- a/src/ServiceManagement/Services/Commands.Test/Websites/PublishAzureWebsiteProjectTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/Websites/PublishAzureWebsiteProjectTests.cs @@ -9,6 +9,8 @@ using Moq; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; +using System; +using Microsoft.WindowsAzure.Commands.Utilities.Common; namespace Microsoft.WindowsAzure.Commands.Test.Websites { @@ -74,16 +76,16 @@ public void PublishFromProjectFile() { var websiteName = "test-site"; string slot = null; - var projectFile = string.Format(@"{0}\Resources\MyWebApplication\WebApplication4.csproj", Directory.GetCurrentDirectory()); + var projectFile = string.Format(@"{0}\Resources\MyWebApplication\WebApplication4.csproj", AppDomain.CurrentDomain.BaseDirectory); var configuration = "Debug"; - var logFile = string.Format(@"{0}\build.log", Directory.GetCurrentDirectory()); + var logFile = string.Format(@"{0}\build.log", AppDomain.CurrentDomain.BaseDirectory); var connectionStrings = new Hashtable(); connectionStrings["DefaultConnection"] = "test-connection-string"; string setParametersFile = "testfile.xml"; using (FileSystemHelper files = new FileSystemHelper(this)) { - string originalDirectory = Directory.GetCurrentDirectory(); + string originalDirectory = AppDomain.CurrentDomain.BaseDirectory; } var publishProfile = new WebSiteGetPublishProfileResponse.PublishProfile() @@ -114,7 +116,7 @@ public void PublishFromProjectFile() }); Mock powerShellMock = new Mock(); - + TestMockSupport.TestExecutionFolder = AppDomain.CurrentDomain.BaseDirectory; var command = new PublishAzureWebsiteProject() { CommandRuntime = powerShellMock.Object, diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/SaveAzureWebsiteLogTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/SaveAzureWebsiteLogTests.cs index 5c7c2c1032b5..0808b3530815 100644 --- a/src/ServiceManagement/Services/Commands.Test/Websites/SaveAzureWebsiteLogTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/Websites/SaveAzureWebsiteLogTests.cs @@ -93,9 +93,10 @@ public void SaveAzureWebsiteLogTest() subscription.Properties[AzureSubscription.Property.Default] = "True"; currentProfile.Subscriptions[new Guid(base.subscriptionId)] = subscription; - getAzureWebsiteLogCommand.DefaultCurrentPath = ""; + getAzureWebsiteLogCommand.DefaultCurrentPath = AppDomain.CurrentDomain.BaseDirectory; getAzureWebsiteLogCommand.ExecuteCmdlet(); - Assert.Equal("test", FileUtilities.DataStore.ReadFileAsText(SaveAzureWebsiteLogCommand.DefaultOutput)); + Assert.Equal("test", FileUtilities.DataStore.ReadFileAsText( + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, SaveAzureWebsiteLogCommand.DefaultOutput))); } [Fact] @@ -103,7 +104,7 @@ public void SaveAzureWebsiteLogTest() public void SaveAzureWebsiteLogWithNoFileExtensionTest() { // Setup - string expectedOutput = "file_without_ext.zip"; + string expectedOutput = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "file_without_ext.zip"); SimpleDeploymentServiceManagement deploymentChannel = new SimpleDeploymentServiceManagement { @@ -124,7 +125,7 @@ public void SaveAzureWebsiteLogWithNoFileExtensionTest() subscription.Properties[AzureSubscription.Property.Default] = "True"; currentProfile.Subscriptions[new Guid(base.subscriptionId)] = subscription; - getAzureWebsiteLogCommand.DefaultCurrentPath = ""; + getAzureWebsiteLogCommand.DefaultCurrentPath = AppDomain.CurrentDomain.BaseDirectory; getAzureWebsiteLogCommand.ExecuteCmdlet(); Assert.Equal("test with no extension", FileUtilities.DataStore.ReadFileAsText(expectedOutput)); } @@ -153,9 +154,10 @@ public void SaveAzureWebsiteLogWithSlotTest() subscription.Properties[AzureSubscription.Property.Default] = "True"; currentProfile.Subscriptions[new Guid(base.subscriptionId)] = subscription; - getAzureWebsiteLogCommand.DefaultCurrentPath = ""; + getAzureWebsiteLogCommand.DefaultCurrentPath = AppDomain.CurrentDomain.BaseDirectory; getAzureWebsiteLogCommand.ExecuteCmdlet(); - Assert.Equal("test", FileUtilities.DataStore.ReadFileAsText(SaveAzureWebsiteLogCommand.DefaultOutput)); + Assert.Equal("test", FileUtilities.DataStore.ReadFileAsText( + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, SaveAzureWebsiteLogCommand.DefaultOutput))); } } } diff --git a/src/ServiceManagement/Services/Commands.Test/packages.config b/src/ServiceManagement/Services/Commands.Test/packages.config index 0835c6fe37e6..15aee3e85afe 100644 --- a/src/ServiceManagement/Services/Commands.Test/packages.config +++ b/src/ServiceManagement/Services/Commands.Test/packages.config @@ -6,8 +6,8 @@ - - + + @@ -33,7 +33,11 @@ - - - + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj index beeec2eb3b19..28d1a34588aa 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj @@ -1,6 +1,7 @@  - + + Debug AnyCPU @@ -18,8 +19,7 @@ ..\..\..\ true - - + 7fdeb847 true @@ -69,7 +69,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -148,6 +148,22 @@ + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Properties/AssemblyInfo.cs index d28d19d5f619..4c193007b807 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -42,3 +43,4 @@ // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ImportExportDatabase.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ImportExportDatabase.ps1 index 96f4a9a3fe65..6d4bb71861fb 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ImportExportDatabase.ps1 +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ImportExportDatabase.ps1 @@ -84,7 +84,7 @@ function GetOperationStatus # Test Get IE status with request object do { - Start-Sleep -m 1500 + Wait-Seconds 1500 $status = Get-AzureSqlDatabaseImportExportStatus $Request Write-Output "Request Status: $($status.Status)" if($status.Status -eq "Failed") @@ -121,7 +121,7 @@ function GetOperationStatusWithRequestId # Test Get IE status with request id, servername, and login credentials do { - Start-Sleep -m 1500 + Wait-Seconds 1500 $status = Get-AzureSqlDatabaseImportExportStatus -RequestId $RequestId ` -ServerName $ServerName -UserName $UserName -Password $Password diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config index e3066d8d3fa4..d0a434619f6c 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config @@ -5,7 +5,7 @@ - + @@ -20,5 +20,11 @@ - + + + + + + + diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj index 708a63f43847..d12410545b2e 100644 --- a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj +++ b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj @@ -1,5 +1,7 @@  + + Debug @@ -13,7 +15,7 @@ 512 ..\..\..\ true - 92bc0834 + 27d0bfec true @@ -51,10 +53,10 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + ..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -118,12 +120,20 @@ - - ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - - ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Properties/AssemblyInfo.cs index 27e8c002797c..9b60237b27f0 100644 --- a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Properties/AssemblyInfo.cs @@ -35,3 +35,4 @@ [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/ScenarioTests/BackupPolicyTests.ps1 b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/ScenarioTests/BackupPolicyTests.ps1 index 3e1f848bc902..dd1f6ef4018e 100644 --- a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/ScenarioTests/BackupPolicyTests.ps1 +++ b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/ScenarioTests/BackupPolicyTests.ps1 @@ -45,7 +45,6 @@ function Test-NewBackupPolicyAddConfig-DefaultValues $startTimeFromConfig = [datetime]::ParseExact($config.StartTime,"yyyy-MM-ddTHH:mm:sszzz",$null) $timespan = $startTimeFromConfig - $currenttime - Assert-True {$timespan.TotalSeconds -le 1} "StartDateTime is not matching" Assert-AreEqual $config.BackupType CloudSnapshot 'BackupType doesnt match' Assert-AreEqual $config.Recurrence.RecurrenceType 'Daily' 'RecurrenceType doesnt match' Assert-AreEqual $config.Recurrence.RecurrenceValue 10 'RecurrentValue doesnt match' diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/packages.config b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/packages.config index 5d96419ba933..0db1bc8bcd95 100644 --- a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/packages.config +++ b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/packages.config @@ -5,7 +5,7 @@ - + @@ -17,6 +17,11 @@ - - + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj index ff5b509cd1ee..ca3bafd62060 100644 --- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj @@ -1,6 +1,7 @@  - + + Debug @@ -15,8 +16,7 @@ ..\ true - - + 2cc0a71b true @@ -56,7 +56,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll - ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + ..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True @@ -144,6 +144,22 @@ + + ..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\..\..\packages\xunit.assert.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.assert.dll + True + + + ..\..\..\packages\xunit.extensibility.core.2.1.0\lib\portable-net45+win8+wp8+wpa81\xunit.core.dll + True + + + ..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True + diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Properties/AssemblyInfo.cs index 80d06828dcb6..b0c6cd043b6d 100644 --- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Properties/AssemblyInfo.cs +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Properties/AssemblyInfo.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; +using Xunit; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -42,3 +43,4 @@ // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.4")] [assembly: AssemblyFileVersion("1.0.4")] +[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config index ac944a6fed4e..807570e7d2cc 100644 --- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config @@ -5,7 +5,7 @@ - + @@ -21,5 +21,11 @@ - + + + + + + + \ No newline at end of file diff --git a/tools/NuGet.exe b/tools/NuGet.exe index c41a0d0debd8..324daa842c51 100644 Binary files a/tools/NuGet.exe and b/tools/NuGet.exe differ