Skip to content

Commit 567d576

Browse files
author
Ziyue Zheng
authored
Remove WebsitesController (#18469)
* Remove WebsitesController * Update WebsitesTestRunner.cs * Update WebsitesTestRunner.cs
1 parent 23ffff9 commit 567d576

File tree

11 files changed

+111
-295
lines changed

11 files changed

+111
-295
lines changed

src/Websites/Websites.Test/ScenarioTests/AccessRestrictionTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public class AccessRestrictionTests : WebsitesTestRunner
2323
{
2424
public AccessRestrictionTests(ITestOutputHelper output)
2525
: base(output)
26-
{ }
27-
26+
{
27+
}
2828

2929
[Fact]
3030
[Trait(Category.AcceptanceType, Category.CheckIn)]

src/Websites/Websites.Test/ScenarioTests/AppServiceEnvironmentTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,13 @@ public void TestGetAppServiceEnvironment()
3333
TestRunner.RunTestScript("Test-GetAppServiceEnvironment");
3434
}
3535

36-
3736
[Fact(Skip = "Need to be record")]
3837
[Trait(Category.AcceptanceType, Category.CheckIn)]
3938
public void TestRemoveAppServiceEnvironment()
4039
{
4140
TestRunner.RunTestScript("Test-RemoveAppServiceEnvironment");
4241
}
4342

44-
4543
[Fact(Skip = "Need to be record")]
4644
[Trait(Category.AcceptanceType, Category.CheckIn)]
4745
public void TestE2EAppServiceEnvironment()

src/Websites/Websites.Test/ScenarioTests/AppServicePlanTests.cs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,71 +13,66 @@
1313
// ----------------------------------------------------------------------------------
1414

1515

16-
using Microsoft.Azure.ServiceManagement.Common.Models;
1716
using Microsoft.WindowsAzure.Commands.ScenarioTest;
18-
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
1917
using Xunit;
2018
using Xunit.Abstractions;
2119

2220
namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
2321
{
24-
public class AppServicePlanTests : RMTestBase
22+
public class AppServicePlanTests : WebsitesTestRunner
2523
{
26-
public XunitTracingInterceptor _logger;
27-
2824
public AppServicePlanTests(ITestOutputHelper output)
25+
: base(output)
2926
{
30-
_logger = new XunitTracingInterceptor(output);
31-
XunitTracingInterceptor.AddToContext(_logger);
3227
}
3328

3429
[Fact]
3530
[Trait(Category.AcceptanceType, Category.CheckIn)]
3631
public void TestCreateNewAppServicePlan()
3732
{
38-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-CreateNewAppServicePlan");
33+
TestRunner.RunTestScript("Test-CreateNewAppServicePlan");
3934
}
4035

4136
[Fact]
4237
[Trait(Category.AcceptanceType, Category.CheckIn)]
4338
public void TestCreateNewAppServicePlanHyperV()
4439
{
45-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-CreateNewAppServicePlanHyperV");
40+
TestRunner.RunTestScript("Test-CreateNewAppServicePlanHyperV");
4641
}
4742

4843
[Fact]
4944
[Trait(Category.AcceptanceType, Category.CheckIn)]
5045
public void TestCreateNewAppServicePlanLinux()
5146
{
52-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-CreateNewAppServicePlanLinux");
47+
TestRunner.RunTestScript("Test-CreateNewAppServicePlanLinux");
5348
}
5449

5550
[Fact]
5651
[Trait(Category.AcceptanceType, Category.CheckIn)]
5752
public void TestSetAppServicePlan()
5853
{
59-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-SetAppServicePlan");
54+
TestRunner.RunTestScript("Test-SetAppServicePlan");
6055
}
6156

6257
[Fact(Skip = "Needs investigation. Fails running playback")]
6358
[Trait(Category.AcceptanceType, Category.CheckIn)]
6459
public void TestGetAppServicePlan()
6560
{
66-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-GetAppServicePlan");
61+
TestRunner.RunTestScript("Test-GetAppServicePlan");
6762
}
6863

6964
[Fact]
7065
[Trait(Category.AcceptanceType, Category.CheckIn)]
7166
public void TestRemoveAppServicePlan()
7267
{
73-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-RemoveAppServicePlan");
68+
TestRunner.RunTestScript("Test-RemoveAppServicePlan");
7469
}
7570

7671
[Fact(Skip = "TODO #5594: This test requires a pre-set AppService Environment with specific settings.")]
7772
[Trait(Category.AcceptanceType, Category.CheckIn)]
7873
public void TestCreateNewAppServicePlanInAse()
7974
{
80-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-CreateNewAppServicePlanInAse");
75+
TestRunner.RunTestScript("Test-CreateNewAppServicePlanInAse");
8176
}
8277
}
8378
}

src/Websites/Websites.Test/ScenarioTests/CertificatesTests.cs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,53 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.ServiceManagement.Common.Models;
15+
1616
using Microsoft.WindowsAzure.Commands.ScenarioTest;
17-
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
1817
using Xunit;
1918
using Xunit.Abstractions;
2019

2120
namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
2221
{
23-
public class CertificatesTests : RMTestBase
22+
public class CertificatesTests : WebsitesTestRunner
2423
{
25-
public XunitTracingInterceptor _logger;
2624
public CertificatesTests(ITestOutputHelper output)
25+
: base(output)
2726
{
28-
_logger = new XunitTracingInterceptor(output);
29-
XunitTracingInterceptor.AddToContext(_logger);
3027
}
3128

3229
[Fact]
3330
[Trait(Category.AcceptanceType, Category.CheckIn)]
3431
public void TestNewAzWebAppCertificate()
3532
{
36-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-NewAzWebAppCertificate");
33+
TestRunner.RunTestScript("Test-NewAzWebAppCertificate");
3734
}
35+
3836
[Fact]
3937
[Trait(Category.AcceptanceType, Category.CheckIn)]
4038
public void TestNewAzWebAppCertificateWithSSLBinding()
4139
{
42-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-NewAzWebAppCertificateWithSSLBinding");
40+
TestRunner.RunTestScript("Test-NewAzWebAppCertificateWithSSLBinding");
4341
}
42+
4443
[Fact]
4544
[Trait(Category.AcceptanceType, Category.CheckIn)]
4645
public void TestNewAzWebAppCertificateForSlot()
4746
{
48-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-NewAzWebAppCertificateForSlot");
47+
TestRunner.RunTestScript("Test-NewAzWebAppCertificateForSlot");
4948
}
49+
5050
[Fact]
5151
[Trait(Category.AcceptanceType, Category.CheckIn)]
5252
public void TestRemoveAzWebAppCertificate()
5353
{
54-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-RemoveAzWebAppCertificate");
54+
TestRunner.RunTestScript("Test-RemoveAzWebAppCertificate");
5555
}
56+
5657
[Fact]
5758
[Trait(Category.AcceptanceType, Category.CheckIn)]
5859
public void TestImportAzWebAppKeyVaultCertificate()
5960
{
60-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-ImportAzWebAppKeyVaultCertificate");
61+
TestRunner.RunTestScript("Test-ImportAzWebAppKeyVaultCertificate");
6162
}
6263
}
6364
}

src/Websites/Websites.Test/ScenarioTests/RoutingRuleTests.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,45 @@
1313
// ----------------------------------------------------------------------------------
1414

1515

16-
using Microsoft.Azure.ServiceManagement.Common.Models;
1716
using Microsoft.WindowsAzure.Commands.ScenarioTest;
18-
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
1917
using Xunit;
2018
using Xunit.Abstractions;
2119

2220
namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
2321
{
24-
public class RoutingRuleTests: RMTestBase
22+
public class RoutingRuleTests: WebsitesTestRunner
2523
{
26-
public XunitTracingInterceptor _logger;
2724
public RoutingRuleTests(ITestOutputHelper output)
25+
: base(output)
2826
{
29-
_logger = new XunitTracingInterceptor(output);
30-
XunitTracingInterceptor.AddToContext(_logger);
3127
}
3228

3329
[Fact]
3430
[Trait(Category.AcceptanceType, Category.CheckIn)]
3531
public void TestAddWebAppTrafficRoutingRule()
3632
{
37-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-AddWebAppTrafficRoutingRule");
33+
TestRunner.RunTestScript("Test-AddWebAppTrafficRoutingRule");
3834
}
3935

4036
[Fact]
4137
[Trait(Category.AcceptanceType, Category.CheckIn)]
4238
public void TestRemoveWebAppTrafficRoutingRule()
4339
{
44-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-RemoveWebAppTrafficRoutingRule");
40+
TestRunner.RunTestScript("Test-RemoveWebAppTrafficRoutingRule");
4541
}
4642

4743
[Fact]
4844
[Trait(Category.AcceptanceType, Category.CheckIn)]
4945
public void TestGetWebAppTrafficRoutingRule()
5046
{
51-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-GetWebAppTrafficRoutingRule");
47+
TestRunner.RunTestScript("Test-GetWebAppTrafficRoutingRule");
5248
}
5349

5450
[Fact]
5551
[Trait(Category.AcceptanceType, Category.CheckIn)]
5652
public void TestUpdateWebAppTrafficRoutingRule()
5753
{
58-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-UpdateWebAppTrafficRoutingRule");
54+
TestRunner.RunTestScript("Test-UpdateWebAppTrafficRoutingRule");
5955
}
6056
}
6157
}

src/Websites/Websites.Test/ScenarioTests/SSLBindingTests.cs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,64 +13,59 @@
1313
// ----------------------------------------------------------------------------------
1414

1515

16-
using Microsoft.Azure.ServiceManagement.Common.Models;
1716
using Microsoft.WindowsAzure.Commands.ScenarioTest;
18-
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
1917
using Xunit;
2018
using Xunit.Abstractions;
2119

2220
namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
2321
{
24-
public class SSLBindingTests : RMTestBase
22+
public class SSLBindingTests : WebsitesTestRunner
2523
{
26-
public XunitTracingInterceptor _logger;
27-
2824
public SSLBindingTests(ITestOutputHelper output)
25+
: base(output)
2926
{
30-
_logger = new XunitTracingInterceptor(output);
31-
XunitTracingInterceptor.AddToContext(_logger);
3227
}
3328

3429
[Fact]
3530
[Trait(Category.AcceptanceType, Category.CheckIn)]
3631
public void TestCreateNewWebAppSSLBinding()
3732
{
38-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-CreateNewWebAppSSLBinding");
33+
TestRunner.RunTestScript("Test-CreateNewWebAppSSLBinding");
3934
}
4035

4136
[Fact]
4237
[Trait(Category.AcceptanceType, Category.CheckIn)]
4338
public void TestGetNewWebAppSSLBinding()
4439
{
45-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-GetNewWebAppSSLBinding");
40+
TestRunner.RunTestScript("Test-GetNewWebAppSSLBinding");
4641
}
4742

4843
[Fact]
4944
[Trait(Category.AcceptanceType, Category.CheckIn)]
5045
public void TestRemoveNewWebAppSSLBinding()
5146
{
52-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-RemoveNewWebAppSSLBinding");
47+
TestRunner.RunTestScript("Test-RemoveNewWebAppSSLBinding");
5348
}
5449

5550
[Fact]
5651
[Trait(Category.AcceptanceType, Category.CheckIn)]
5752
public void TestWebAppSSLBindingPipeSupport()
5853
{
59-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-WebAppSSLBindingPipeSupport");
54+
TestRunner.RunTestScript("Test-WebAppSSLBindingPipeSupport");
6055
}
6156

6257
[Fact]
6358
[Trait(Category.AcceptanceType, Category.CheckIn)]
6459
public void TestGetWebAppCertificate()
6560
{
66-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-GetWebAppCertificate");
61+
TestRunner.RunTestScript("Test-GetWebAppCertificate");
6762
}
6863

6964
[Fact]
7065
[Trait(Category.AcceptanceType, Category.CheckIn)]
7166
public void TagsNotRemovedByCreateNewWebAppSSLBinding()
7267
{
73-
WebsitesController.NewInstance.RunPsTest(_logger, "Test-TagsNotRemovedByCreateNewWebAppSSLBinding");
68+
TestRunner.RunTestScript("Test-TagsNotRemovedByCreateNewWebAppSSLBinding");
7469
}
7570
}
76-
}
71+
}

0 commit comments

Comments
 (0)