Skip to content

Commit e83a6ab

Browse files
committed
Websites cmdlets
1 parent 520e621 commit e83a6ab

File tree

77 files changed

+67344
-1
lines changed

Some content is hidden

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

77 files changed

+67344
-1
lines changed

src/CLU/CLUCoreCLR.sln

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.24711.0
4+
VisualStudioVersion = 14.0.23107.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Commands.Common", "Commands.Common\Commands.Common.xproj", "{5F567ACA-595E-436D-83DB-A21E08F82DF6}"
77
EndProject
@@ -11,6 +11,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Commands.Common.Resources",
1111
EndProject
1212
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Profile", "Microsoft.Azure.Commands.Profile\Microsoft.Azure.Commands.Profile.xproj", "{45B05B68-516F-4D74-897F-56D12894946C}"
1313
EndProject
14+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Azure.Commands.Websites", "Microsoft.Azure.Commands.Websites\Microsoft.Azure.Commands.Websites.xproj", "{F1A791BB-273E-446F-B9A1-6F8B9991F712}"
15+
EndProject
1416
Global
1517
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1618
Debug|Any CPU = Debug|Any CPU
@@ -33,6 +35,10 @@ Global
3335
{45B05B68-516F-4D74-897F-56D12894946C}.Debug|Any CPU.Build.0 = Debug|Any CPU
3436
{45B05B68-516F-4D74-897F-56D12894946C}.Release|Any CPU.ActiveCfg = Release|Any CPU
3537
{45B05B68-516F-4D74-897F-56D12894946C}.Release|Any CPU.Build.0 = Release|Any CPU
38+
{F1A791BB-273E-446F-B9A1-6F8B9991F712}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39+
{F1A791BB-273E-446F-B9A1-6F8B9991F712}.Debug|Any CPU.Build.0 = Debug|Any CPU
40+
{F1A791BB-273E-446F-B9A1-6F8B9991F712}.Release|Any CPU.ActiveCfg = Release|Any CPU
41+
{F1A791BB-273E-446F-B9A1-6F8B9991F712}.Release|Any CPU.Build.0 = Release|Any CPU
3642
EndGlobalSection
3743
GlobalSection(SolutionProperties) = preSolution
3844
HideSolutionNode = FALSE

src/CLU/Microsoft.Azure.Commands.Websites.Test/Commands.Websites.Test.csproj

Lines changed: 260 additions & 0 deletions
Large diffs are not rendered by default.
Binary file not shown.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Collections;
16+
using System.Collections.Generic;
17+
using System.Management.Automation;
18+
using Microsoft.Azure.Commands.WebApps.Utilities;
19+
using Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps;
20+
using Moq;
21+
22+
23+
namespace Microsoft.Azure.Commands.Websites.Test
24+
{
25+
public class NewAzureWebAppCommandTests
26+
{
27+
private NewAzureWebAppCmdlet cmdlet;
28+
29+
private Mock<WebsitesClient> websitesClientMock;
30+
31+
private Mock<ICommandRuntime> commandRuntimeMock;
32+
33+
// ResourceGroupName, WebsiteName, SlotName, Location, WebHostingPlan
34+
35+
36+
private string resourceGroupName = "Default-Web-WestUS";
37+
38+
private string websiteName = "ngoliPSWebsite";
39+
40+
private string slotName = null;
41+
42+
private string webHostingPlan = "myWHP";
43+
44+
private string location = "West US";
45+
46+
private Dictionary<string, object> properties;
47+
48+
private Hashtable[] tags;
49+
50+
public NewAzureWebAppCommandTests()
51+
{
52+
websitesClientMock = new Mock<WebsitesClient>();
53+
commandRuntimeMock = new Mock<ICommandRuntime>();
54+
cmdlet = new NewAzureWebAppCmdlet()
55+
{
56+
CommandRuntime = commandRuntimeMock.Object,
57+
WebsitesClient = websitesClientMock.Object
58+
};
59+
}
60+
61+
}
62+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
using Xunit;
5+
6+
// General Information about an assembly is controlled through the following
7+
// set of attributes. Change these attribute values to modify the information
8+
// associated with an assembly.
9+
[assembly: AssemblyTitle("Commands.Websites.Test")]
10+
[assembly: AssemblyDescription("")]
11+
[assembly: AssemblyConfiguration("")]
12+
[assembly: AssemblyCompany("Microsoft")]
13+
[assembly: AssemblyProduct("Commands.Websites.Test")]
14+
[assembly: AssemblyCopyright("Copyright © Microsoft 2014")]
15+
[assembly: AssemblyTrademark("")]
16+
[assembly: AssemblyCulture("")]
17+
18+
// Setting ComVisible to false makes the types in this assembly not visible
19+
// to COM components. If you need to access a type in this assembly from
20+
// COM, set the ComVisible attribute to true on that type.
21+
[assembly: ComVisible(false)]
22+
23+
// The following GUID is for the ID of the typelib if this project is exposed to COM
24+
[assembly: Guid("a893f297-3311-4224-8086-a4bb3c5e478a")]
25+
26+
// Version information for an assembly consists of the following four values:
27+
//
28+
// Major Version
29+
// Minor Version
30+
// Build Number
31+
// Revision
32+
//
33+
// You can specify all the values or you can default the Build and Revision Numbers
34+
// by using the '*' as shown below:
35+
// [assembly: AssemblyVersion("1.0.*")]
36+
[assembly: AssemblyVersion("1.0.0.0")]
37+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
16+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
17+
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
18+
using Xunit;
19+
20+
namespace Microsoft.Azure.Commands.Websites.Test.ScenarioTests
21+
{
22+
public class AppServicePlanTests : RMTestBase
23+
{
24+
[Fact(Skip = "TODO, [#108248038]: Enable scenario tests")]
25+
[Trait(Category.AcceptanceType, Category.CheckIn)]
26+
public void TestCreateNewAppServicePlan()
27+
{
28+
WebsitesController.NewInstance.RunPsTest("Test-CreateNewAppServicePlan");
29+
}
30+
31+
[Fact(Skip = "TODO, [#108248038]: Enable scenario tests")]
32+
[Trait(Category.AcceptanceType, Category.CheckIn)]
33+
public void TestSetAppServicePlan()
34+
{
35+
WebsitesController.NewInstance.RunPsTest("Test-SetAppServicePlan");
36+
}
37+
38+
[Fact(Skip="Needs investigation. Fails running playback")]
39+
[Trait(Category.AcceptanceType, Category.CheckIn)]
40+
public void TestGetAppServicePlan()
41+
{
42+
WebsitesController.NewInstance.RunPsTest("Test-GetAppServicePlan");
43+
}
44+
45+
[Fact(Skip = "TODO, [#108248038]: Enable scenario tests")]
46+
[Trait(Category.AcceptanceType, Category.CheckIn)]
47+
public void TestRemoveAppServicePlan()
48+
{
49+
WebsitesController.NewInstance.RunPsTest("Test-RemoveAppServicePlan");
50+
}
51+
52+
[Fact(Skip = "Needs investigation. Fails running playback")]
53+
[Trait(Category.AcceptanceType, Category.CheckIn)]
54+
public void TestGetAppServicePlanMetrics()
55+
{
56+
WebsitesController.NewInstance.RunPsTest("Test-GetAppServicePlanMetrics");
57+
}
58+
}
59+
}

0 commit comments

Comments
 (0)