Skip to content

Commit

Permalink
Remove WebsitesController (#18469)
Browse files Browse the repository at this point in the history
* Remove WebsitesController

* Update WebsitesTestRunner.cs

* Update WebsitesTestRunner.cs
  • Loading branch information
ziyuezh576 authored Jun 14, 2022
1 parent 23ffff9 commit 567d576
Show file tree
Hide file tree
Showing 11 changed files with 111 additions and 295 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public class AccessRestrictionTests : WebsitesTestRunner
{
public AccessRestrictionTests(ITestOutputHelper output)
: base(output)
{ }

{
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@ public void TestGetAppServiceEnvironment()
TestRunner.RunTestScript("Test-GetAppServiceEnvironment");
}


[Fact(Skip = "Need to be record")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRemoveAppServiceEnvironment()
{
TestRunner.RunTestScript("Test-RemoveAppServiceEnvironment");
}


[Fact(Skip = "Need to be record")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestE2EAppServiceEnvironment()
Expand Down
23 changes: 9 additions & 14 deletions src/Websites/Websites.Test/ScenarioTests/AppServicePlanTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,71 +13,66 @@
// ----------------------------------------------------------------------------------


using Microsoft.Azure.ServiceManagement.Common.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
{
public class AppServicePlanTests : RMTestBase
public class AppServicePlanTests : WebsitesTestRunner
{
public XunitTracingInterceptor _logger;

public AppServicePlanTests(ITestOutputHelper output)
: base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestCreateNewAppServicePlan()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-CreateNewAppServicePlan");
TestRunner.RunTestScript("Test-CreateNewAppServicePlan");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestCreateNewAppServicePlanHyperV()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-CreateNewAppServicePlanHyperV");
TestRunner.RunTestScript("Test-CreateNewAppServicePlanHyperV");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestCreateNewAppServicePlanLinux()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-CreateNewAppServicePlanLinux");
TestRunner.RunTestScript("Test-CreateNewAppServicePlanLinux");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestSetAppServicePlan()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-SetAppServicePlan");
TestRunner.RunTestScript("Test-SetAppServicePlan");
}

[Fact(Skip = "Needs investigation. Fails running playback")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetAppServicePlan()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-GetAppServicePlan");
TestRunner.RunTestScript("Test-GetAppServicePlan");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRemoveAppServicePlan()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-RemoveAppServicePlan");
TestRunner.RunTestScript("Test-RemoveAppServicePlan");
}

[Fact(Skip = "TODO #5594: This test requires a pre-set AppService Environment with specific settings.")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestCreateNewAppServicePlanInAse()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-CreateNewAppServicePlanInAse");
TestRunner.RunTestScript("Test-CreateNewAppServicePlanInAse");
}
}
}
23 changes: 12 additions & 11 deletions src/Websites/Websites.Test/ScenarioTests/CertificatesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,52 +12,53 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.ServiceManagement.Common.Models;

using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
{
public class CertificatesTests : RMTestBase
public class CertificatesTests : WebsitesTestRunner
{
public XunitTracingInterceptor _logger;
public CertificatesTests(ITestOutputHelper output)
: base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewAzWebAppCertificate()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-NewAzWebAppCertificate");
TestRunner.RunTestScript("Test-NewAzWebAppCertificate");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewAzWebAppCertificateWithSSLBinding()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-NewAzWebAppCertificateWithSSLBinding");
TestRunner.RunTestScript("Test-NewAzWebAppCertificateWithSSLBinding");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestNewAzWebAppCertificateForSlot()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-NewAzWebAppCertificateForSlot");
TestRunner.RunTestScript("Test-NewAzWebAppCertificateForSlot");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRemoveAzWebAppCertificate()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-RemoveAzWebAppCertificate");
TestRunner.RunTestScript("Test-RemoveAzWebAppCertificate");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestImportAzWebAppKeyVaultCertificate()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-ImportAzWebAppKeyVaultCertificate");
TestRunner.RunTestScript("Test-ImportAzWebAppKeyVaultCertificate");
}
}
}
16 changes: 6 additions & 10 deletions src/Websites/Websites.Test/ScenarioTests/RoutingRuleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,45 @@
// ----------------------------------------------------------------------------------


using Microsoft.Azure.ServiceManagement.Common.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
{
public class RoutingRuleTests: RMTestBase
public class RoutingRuleTests: WebsitesTestRunner
{
public XunitTracingInterceptor _logger;
public RoutingRuleTests(ITestOutputHelper output)
: base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAddWebAppTrafficRoutingRule()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-AddWebAppTrafficRoutingRule");
TestRunner.RunTestScript("Test-AddWebAppTrafficRoutingRule");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRemoveWebAppTrafficRoutingRule()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-RemoveWebAppTrafficRoutingRule");
TestRunner.RunTestScript("Test-RemoveWebAppTrafficRoutingRule");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetWebAppTrafficRoutingRule()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-GetWebAppTrafficRoutingRule");
TestRunner.RunTestScript("Test-GetWebAppTrafficRoutingRule");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestUpdateWebAppTrafficRoutingRule()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-UpdateWebAppTrafficRoutingRule");
TestRunner.RunTestScript("Test-UpdateWebAppTrafficRoutingRule");
}
}
}
23 changes: 9 additions & 14 deletions src/Websites/Websites.Test/ScenarioTests/SSLBindingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,59 @@
// ----------------------------------------------------------------------------------


using Microsoft.Azure.ServiceManagement.Common.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
{
public class SSLBindingTests : RMTestBase
public class SSLBindingTests : WebsitesTestRunner
{
public XunitTracingInterceptor _logger;

public SSLBindingTests(ITestOutputHelper output)
: base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestCreateNewWebAppSSLBinding()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-CreateNewWebAppSSLBinding");
TestRunner.RunTestScript("Test-CreateNewWebAppSSLBinding");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetNewWebAppSSLBinding()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-GetNewWebAppSSLBinding");
TestRunner.RunTestScript("Test-GetNewWebAppSSLBinding");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRemoveNewWebAppSSLBinding()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-RemoveNewWebAppSSLBinding");
TestRunner.RunTestScript("Test-RemoveNewWebAppSSLBinding");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestWebAppSSLBindingPipeSupport()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-WebAppSSLBindingPipeSupport");
TestRunner.RunTestScript("Test-WebAppSSLBindingPipeSupport");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestGetWebAppCertificate()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-GetWebAppCertificate");
TestRunner.RunTestScript("Test-GetWebAppCertificate");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TagsNotRemovedByCreateNewWebAppSSLBinding()
{
WebsitesController.NewInstance.RunPsTest(_logger, "Test-TagsNotRemovedByCreateNewWebAppSSLBinding");
TestRunner.RunTestScript("Test-TagsNotRemovedByCreateNewWebAppSSLBinding");
}
}
}
}
Loading

0 comments on commit 567d576

Please sign in to comment.