Skip to content

Commit 1e5a659

Browse files
committed
Merge pull request #46 from ogail/test
Added CheckIn trait for Commands.Test tests
2 parents 3e00457 + 66ddfb6 commit 1e5a659

File tree

109 files changed

+542
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+542
-0
lines changed

AzurePowershell.Test.targets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@
6969
<OnError ExecuteTargets="TimeoutErrorHandler"/>
7070
</Target>
7171

72+
<Target Name="InvokeXUnitAll">
73+
<Message Importance="high" Text="Running XUnit tests" />
74+
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
75+
<Exec
76+
Command="$(MSBuildProjectDirectory)\packages\xunit.runner.console.2.0.0\tools\xunit.console.x86.exe &quot;%(XUnitTests.Identity)&quot; -html &quot;$(TestOutputDirectory)\%(XUnitTests.Filename).html&quot;"
77+
Timeout="$(TestTimeout)" ContinueOnError="false"/>
78+
<OnError ExecuteTargets="TimeoutErrorHandler"/>
79+
</Target>
80+
7281
<Target Name="TimeoutErrorHandler">
7382
<Error Text="XUnit tests in assembly &quot;%(XUnitTests.Filename).dll&quot; failed or timed out. Ensure that all tests in a project pass and collectively take less than 1 minute to run."/>
7483
</Target>

src/ServiceManagement/Services/Commands.Test/CloudService/Development/DisableAzureRemoteDesktopCommandTest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2323
using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema;
2424
using Microsoft.WindowsAzure.Commands.Common;
25+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
2526
using Xunit;
2627
using Microsoft.Azure.Common.Authentication;
2728

@@ -69,6 +70,7 @@ private static void VerifyDisableRoleSettings(CloudServiceProject service)
6970
/// Enable remote desktop for an empty service.
7071
/// </summary>
7172
[Fact]
73+
[Trait(Category.AcceptanceType, Category.CheckIn)]
7274
public void DisableRemoteDesktopForEmptyService()
7375
{
7476
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -102,6 +104,7 @@ public void DisableRemoteDesktopForWebRole()
102104
/// Disable remote desktop for web and worker roles.
103105
/// </summary>
104106
[Fact]
107+
[Trait(Category.AcceptanceType, Category.CheckIn)]
105108
public void DisableRemoteDesktopForWebAndWorkerRoles()
106109
{
107110
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -120,6 +123,7 @@ public void DisableRemoteDesktopForWebAndWorkerRoles()
120123
/// Enable then disable remote desktop for a simple web role.
121124
/// </summary>
122125
[Fact]
126+
[Trait(Category.AcceptanceType, Category.CheckIn)]
123127
public void EnableDisableRemoteDesktopForWebRole()
124128
{
125129
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -142,6 +146,7 @@ public void EnableDisableRemoteDesktopForWebRole()
142146
/// Enable then disable remote desktop for web and worker roles.
143147
/// </summary>
144148
[Fact]
149+
[Trait(Category.AcceptanceType, Category.CheckIn)]
145150
public void EnableDisableRemoteDesktopForWebAndWorkerRoles()
146151
{
147152
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -167,6 +172,7 @@ public void EnableDisableRemoteDesktopForWebAndWorkerRoles()
167172
/// Enable then disable remote desktop for web and worker roles.
168173
/// </summary>
169174
[Fact]
175+
[Trait(Category.AcceptanceType, Category.CheckIn)]
170176
public void EnableDisableEnableRemoteDesktopForWebAndWorkerRoles()
171177
{
172178
using (FileSystemHelper files = new FileSystemHelper(this))

src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureMemcacheRoleTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema;
2828
using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema;
2929
using Microsoft.WindowsAzure.Commands.Utilities.Properties;
30+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
3031
using Xunit;
3132

3233
namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Tests
@@ -61,6 +62,7 @@ public EnableAzureMemcacheRoleTests()
6162
}
6263

6364
[Fact]
65+
[Trait(Category.AcceptanceType, Category.CheckIn)]
6466
public void EnableAzureMemcacheRoleProcess()
6567
{
6668
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -87,6 +89,7 @@ public void EnableAzureMemcacheRoleProcess()
8789
/// Verify that enabling cache on worker role will pass.
8890
/// </summary>
8991
[Fact]
92+
[Trait(Category.AcceptanceType, Category.CheckIn)]
9093
public void EnableAzureMemcacheRoleProcessOnWorkerRoleSuccess()
9194
{
9295
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -143,6 +146,7 @@ public void EnableAzureMemcacheRoleProcessOnWorkerRoleSuccess()
143146
/// Verify that enabling cache with non-existing cache worker role will fail.
144147
/// </summary>
145148
[Fact]
149+
[Trait(Category.AcceptanceType, Category.CheckIn)]
146150
public void EnableAzureMemcacheRoleProcessCacheRoleDoesNotExistFail()
147151
{
148152
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -164,6 +168,7 @@ public void EnableAzureMemcacheRoleProcessCacheRoleDoesNotExistFail()
164168
/// Verify that enabling cache with non-existing role to enable on will fail.
165169
/// </summary>
166170
[Fact]
171+
[Trait(Category.AcceptanceType, Category.CheckIn)]
167172
public void EnableAzureMemcacheRoleProcessRoleDoesNotExistFail()
168173
{
169174
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -184,6 +189,7 @@ public void EnableAzureMemcacheRoleProcessRoleDoesNotExistFail()
184189
/// Verify that enabling cache using same cache worker role on role with cache will fail.
185190
/// </summary>
186191
[Fact]
192+
[Trait(Category.AcceptanceType, Category.CheckIn)]
187193
public void EnableAzureMemcacheRoleProcessAlreadyEnabledFail()
188194
{
189195
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -207,6 +213,7 @@ public void EnableAzureMemcacheRoleProcessAlreadyEnabledFail()
207213
/// Verify that enabling cache using different cache worker role on role with cache will fail.
208214
/// </summary>
209215
[Fact]
216+
[Trait(Category.AcceptanceType, Category.CheckIn)]
210217
public void EnableAzureMemcacheRoleProcessAlreadyEnabledNewCacheRoleFail()
211218
{
212219
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -232,6 +239,7 @@ public void EnableAzureMemcacheRoleProcessAlreadyEnabledNewCacheRoleFail()
232239
/// Verify that enabling cache using non-cache worker role will fail.
233240
/// </summary>
234241
[Fact]
242+
[Trait(Category.AcceptanceType, Category.CheckIn)]
235243
public void EnableAzureMemcacheRoleProcessUsingNonCacheWorkerRole()
236244
{
237245
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -252,6 +260,7 @@ public void EnableAzureMemcacheRoleProcessUsingNonCacheWorkerRole()
252260
}
253261

254262
[Fact]
263+
[Trait(Category.AcceptanceType, Category.CheckIn)]
255264
public void EnableAzureMemcacheRoleProcessWithDefaultRoleName()
256265
{
257266
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -340,6 +349,7 @@ private static void AssertWebConfig(string webCloudConfigPath)
340349
/// Verify that enabling cache with non-existing cache worker role will fail.
341350
/// </summary>
342351
[Fact]
352+
[Trait(Category.AcceptanceType, Category.CheckIn)]
343353
public void EnableAzureMemcacheRoleProcessOnCacheWorkerRoleFail()
344354
{
345355
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -356,6 +366,7 @@ public void EnableAzureMemcacheRoleProcessOnCacheWorkerRoleFail()
356366
}
357367

358368
[Fact]
369+
[Trait(Category.AcceptanceType, Category.CheckIn)]
359370
public void EnableAzureMemcacheWithoutCacheWorkerRoleName()
360371
{
361372
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -379,6 +390,7 @@ public void EnableAzureMemcacheWithoutCacheWorkerRoleName()
379390
}
380391

381392
[Fact]
393+
[Trait(Category.AcceptanceType, Category.CheckIn)]
382394
public void EnableAzureMemcacheWithoutCacheWorkerRoleNameAndServiceHasMultipleWorkerRoles()
383395
{
384396
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -404,6 +416,7 @@ public void EnableAzureMemcacheWithoutCacheWorkerRoleNameAndServiceHasMultipleWo
404416
}
405417

406418
[Fact]
419+
[Trait(Category.AcceptanceType, Category.CheckIn)]
407420
public void EnableAzureMemcacheWithNoCacheWorkerRolesFail()
408421
{
409422
using (FileSystemHelper files = new FileSystemHelper(this))

src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureRemoteDesktopCommandTest.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema;
2626
using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema;
2727
using Microsoft.WindowsAzure.Commands.Common;
28+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
2829
using Xunit;
2930
using Microsoft.Azure.Common.Authentication;
3031

@@ -123,6 +124,7 @@ public static void VerifyRoleSettings(CloudServiceProject service)
123124
/// Perform basic parameter validation.
124125
/// </summary>
125126
[Fact]
127+
[Trait(Category.AcceptanceType, Category.CheckIn)]
126128
public void EnableRemoteDesktopBasicParameterValidation()
127129
{
128130
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -153,6 +155,7 @@ public void EnableRemoteDesktopBasicParameterValidation()
153155
/// Enable remote desktop for an empty service.
154156
/// </summary>
155157
[Fact]
158+
[Trait(Category.AcceptanceType, Category.CheckIn)]
156159
public void EnableRemoteDesktopForEmptyService()
157160
{
158161
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -168,6 +171,7 @@ public void EnableRemoteDesktopForEmptyService()
168171
/// Enable remote desktop for a simple web role.
169172
/// </summary>
170173
[Fact]
174+
[Trait(Category.AcceptanceType, Category.CheckIn)]
171175
public void EnableRemoteDesktopForWebRole()
172176
{
173177
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -190,6 +194,7 @@ public void EnableRemoteDesktopForWebRole()
190194
/// Enable remote desktop for web and worker roles.
191195
/// </summary>
192196
[Fact]
197+
[Trait(Category.AcceptanceType, Category.CheckIn)]
193198
public void EnableRemoteDesktopForWebAndWorkerRoles()
194199
{
195200
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -217,6 +222,7 @@ public void EnableRemoteDesktopForWebAndWorkerRoles()
217222
/// Enable remote desktop for multiple web and worker roles.
218223
/// </summary>
219224
[Fact]
225+
[Trait(Category.AcceptanceType, Category.CheckIn)]
220226
public void EnableRemoteDesktopForMultipleWebAndWorkerRolesTwice()
221227
{
222228
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -256,6 +262,7 @@ public void EnableRemoteDesktopForMultipleWebAndWorkerRolesTwice()
256262
/// Enable remote desktop for a simple web role.
257263
/// </summary>
258264
[Fact]
265+
[Trait(Category.AcceptanceType, Category.CheckIn)]
259266
public void EnableRemoteDesktopUnicode()
260267
{
261268
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -284,6 +291,7 @@ public void EnableRemoteDesktopUnicode()
284291
/// Enable remote desktop using short unicode password.
285292
/// </summary>
286293
[Fact]
294+
[Trait(Category.AcceptanceType, Category.CheckIn)]
287295
public void EnableRemoteDesktopUnicodeAndShortPasswordFails()
288296
{
289297
using (FileSystemHelper files = new FileSystemHelper(this))

src/ServiceManagement/Services/Commands.Test/CloudService/Development/GetAzureServiceProjectRuntimesTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using Microsoft.WindowsAzure.Commands.Test.Utilities.CloudService;
2020
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
2121
using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
22+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
2223
using Xunit;
2324

2425
namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Tests.Cmdlet
@@ -42,6 +43,7 @@ public GetAzureServiceProjectRuntimesTests()
4243
/// Verify that the correct runtimes are returned in the correct format from a given runtime manifest
4344
/// </summary>
4445
[Fact]
46+
[Trait(Category.AcceptanceType, Category.CheckIn)]
4547
public void TestGetRuntimes()
4648
{
4749
using (FileSystemHelper files = new FileSystemHelper(this))

src/ServiceManagement/Services/Commands.Test/CloudService/Development/SaveAzureServiceProjectPackageTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2424
using Microsoft.WindowsAzure.Commands.Utilities.Properties;
2525
using Microsoft.WindowsAzure.Commands.Common;
26+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
2627
using Xunit;
2728
using Microsoft.Azure.Common.Authentication;
2829

@@ -56,6 +57,7 @@ public SaveAzureServiceProjectPackageCommandTest()
5657
}
5758

5859
[Fact]
60+
[Trait(Category.AcceptanceType, Category.CheckIn)]
5961
public void TestCreatePackageSuccessfull()
6062
{
6163
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -78,6 +80,7 @@ public void TestCreatePackageSuccessfull()
7880
}
7981

8082
[Fact]
83+
[Trait(Category.AcceptanceType, Category.CheckIn)]
8184
public void TestCreatePackageWithEmptyServiceSuccessfull()
8285
{
8386
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -97,6 +100,7 @@ public void TestCreatePackageWithEmptyServiceSuccessfull()
97100
}
98101

99102
[Fact]
103+
[Trait(Category.AcceptanceType, Category.CheckIn)]
100104
public void TestCreatePackageWithMultipleRolesSuccessfull()
101105
{
102106
using (FileSystemHelper files = new FileSystemHelper(this))

src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureNodeWebRoleTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using System.IO;
1616
using System.Management.Automation;
17+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1718
using Xunit;
1819
using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding;
1920
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;

src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureNodeWorkerRoleTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using System.IO;
1616
using System.Management.Automation;
17+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1718
using Xunit;
1819
using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding;
1920
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;

src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePHPWebRoleTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using System.IO;
1616
using System.Management.Automation;
17+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1718
using Xunit;
1819
using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding;
1920
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;

src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePHPWorkerRoleTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using System.IO;
1616
using System.Management.Automation;
17+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1718
using Xunit;
1819
using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding;
1920
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;

src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWebRoleTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using System.IO;
1616
using System.Management.Automation;
17+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1718
using Xunit;
1819
using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding;
1920
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;
@@ -115,6 +116,7 @@ public void AddAzureWebRoleWithTemplateFolder()
115116
}
116117

117118
[Fact]
119+
[Trait(Category.AcceptanceType, Category.CheckIn)]
118120
public void AddAzureWebRoleWithMissingScaffoldXmlFail()
119121
{
120122
using (FileSystemHelper files = new FileSystemHelper(this))

src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWorkerRoleTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using System.IO;
1616
using System.Management.Automation;
17+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1718
using Xunit;
1819
using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding;
1920
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;
@@ -119,6 +120,7 @@ public void AddAzureWorkerRoleWithTemplateFolder()
119120
}
120121

121122
[Fact]
123+
[Trait(Category.AcceptanceType, Category.CheckIn)]
122124
public void AddAzureWorkerRoleWithMissingScaffoldXmlFail()
123125
{
124126
string scaffoldingPath = "TemplateMissingScaffoldXml";

src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureRoleTemplateTests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using System.IO;
1616
using System.Management.Automation;
1717
using System.Reflection;
18+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1819
using Xunit;
1920
using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding;
2021
using Microsoft.WindowsAzure.Commands.Common.Test.Mocks;
@@ -40,6 +41,7 @@ public NewAzureRoleTemplateTests()
4041
}
4142

4243
[Fact]
44+
[Trait(Category.AcceptanceType, Category.CheckIn)]
4345
public void NewAzureRoleTemplateWithWebRole()
4446
{
4547
string outputPath = Path.Combine(Directory.GetCurrentDirectory(), "WebRoleTemplate");
@@ -52,6 +54,7 @@ public void NewAzureRoleTemplateWithWebRole()
5254
}
5355

5456
[Fact]
57+
[Trait(Category.AcceptanceType, Category.CheckIn)]
5558
public void NewAzureRoleTemplateWithWorkerRole()
5659
{
5760
string outputPath = Path.Combine(Directory.GetCurrentDirectory(), "WorkerRoleTemplate");
@@ -64,6 +67,7 @@ public void NewAzureRoleTemplateWithWorkerRole()
6467
}
6568

6669
[Fact]
70+
[Trait(Category.AcceptanceType, Category.CheckIn)]
6771
public void NewAzureRoleTemplateWithOutputPath()
6872
{
6973
using (FileSystemHelper files = new FileSystemHelper(this))
@@ -79,6 +83,7 @@ public void NewAzureRoleTemplateWithOutputPath()
7983
}
8084

8185
[Fact]
86+
[Trait(Category.AcceptanceType, Category.CheckIn)]
8287
public void NewAzureRoleTemplateWithDirectoryExists()
8388
{
8489
using (FileSystemHelper files = new FileSystemHelper(this))

0 commit comments

Comments
 (0)