Skip to content

Commit 3118a0e

Browse files
committed
Merge pull request #128 from khoatle/dev
Remove tests from RunnerTests.csv to reduce run time
2 parents fbee436 + f99c1fb commit 3118a0e

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,6 @@
229229
<None Include="ScenarioTests\DummyConfig.ps1">
230230
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
231231
</None>
232-
<None Include="ScenarioTests\Generated\VirtualMachineDynamicTest1.ps1">
233-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
234-
</None>
235-
<None Include="ScenarioTests\Generated\VirtualMachineDynamicTest2.ps1">
236-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
237-
</None>
238-
<None Include="ScenarioTests\Generated\VirtualMachineDynamicTest3.ps1">
239-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
240-
</None>
241232
<None Include="ScenarioTests\RunnerTests.csv">
242233
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
243234
</None>

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/RunnerTests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public void ExecuteRunnerTests()
3434
var credential = new ClientCredential(testEnv.ClientId, envDictionary["ApplicationSecret"]);
3535

3636
var result = authenticationContext.AcquireToken("https://management.core.windows.net/", clientCredential: credential);
37+
3738
Assert.NotNull(result.AccessToken);
3839
envDictionary["RawToken"] = result.AccessToken;
3940

@@ -54,7 +55,11 @@ public void ExecuteRunnerTests()
5455
var testClassInstance = constructorInfo.Invoke(new object[] {});
5556
var testMethod = type.GetMethod(method);
5657

58+
Console.WriteLine("Invoking method : " + testMethod);
59+
5760
testMethod.Invoke(testClassInstance, new object[] {});
61+
62+
Console.WriteLine("Method " + testMethod + " has finished");
5863
}
5964
}
6065
}
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
Microsoft.Azure.Commands.Compute.Test.ScenarioTests.AvailabilitySetTests;TestAvailabilitySet
2-
Microsoft.Azure.Commands.Compute.Test.ScenarioTests.ComputeCloudExceptionTests;RunComputeCloudExceptionTests
3-
Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests;TestLinuxVirtualMachine
4-
Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineProfileTests;TestVirtualMachineProfile
5-
Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VMDynamicTests;RunVMDynamicTests
1+
Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VMDynamicTests;RunVMDynamicTests

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VMDynamicTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using System;
16+
using System.IO;
1517
using Microsoft.Azure.Test.HttpRecorder;
1618
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1719
using Xunit;
@@ -24,7 +26,7 @@ public partial class VMDynamicTests
2426
[Trait(Category.AcceptanceType, Category.CheckIn)]
2527
public void RunVMDynamicTests()
2628
{
27-
ComputeTestController.NewInstance.RunPsTest("Run-VMDynamicTests");
29+
ComputeTestController.NewInstance.RunPsTest("Run-VMDynamicTests -num_total_generated_tests 1");
2830
}
2931
}
3032
}

0 commit comments

Comments
 (0)