Skip to content

Commit 669fea3

Browse files
committed
Merge pull request #197 from hyonholee/dev
Fix ServiceManagement tests
2 parents f8388a8 + 86d716b commit 669fea3

File tree

7 files changed

+18
-36
lines changed

7 files changed

+18
-36
lines changed

src/AzureRT.testsettings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Description>These are test settings for AzureRT test run.</Description>
88
<Deployment>
99
<DeploymentItem filename="ServiceManagement\Compute\Commands.ServiceManagement.Test\Resources\" />
10-
<DeploymentItem filename="Package\Debug\" />
10+
<DeploymentItem filename="ServiceManagement\Compute\Commands.ServiceManagement.Test\bin\Debug\" />
1111
</Deployment>
1212
<Execution parallelTestCount="0">
1313
<Timeouts testTimeout="3000000" />

src/ResourceManager.ForRefactoringOnly.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Reso
119119
EndProject
120120
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}"
121121
EndProject
122-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage", "Common\Storage\Commands.Storage\Commands.Storage.csproj", "{08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}"
122+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage", "Storage\Commands.Storage\Commands.Storage.csproj", "{08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}"
123123
EndProject
124124
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Common", "ServiceManagement\Common\Commands.ServiceManagement.Common\Commands.ServiceManagement.Common.csproj", "{CFF09E81-1E31-444E-B4D4-A21E946C29E2}"
125125
EndProject

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdlet.cs

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,20 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests
1919
{
2020
public class WindowsAzurePowershellCmdlet : PowershellCmdlet
2121
{
22-
private static readonly string[] modules = new[]
23-
{
24-
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellServiceModule)
25-
};
26-
2722
public WindowsAzurePowershellCmdlet(CmdletsInfo cmdlet) : base(cmdlet, ConstructModules())
2823
{
2924
}
3025

31-
public static string[] Modules
32-
{
33-
get
34-
{
35-
return modules;
36-
}
37-
}
38-
3926
private static PowershellModule[] ConstructModules()
4027
{
4128
var modules = new[]
4229
{
43-
new PowershellModule(Utilities.windowsAzurePowershellServiceModule, Utilities.windowsAzurePowershellPath),
44-
new PowershellModule(Utilities.AzurePowershellModuleServiceManagementPirModule, Utilities.windowsAzurePowershellDefaultPath),
45-
new PowershellModule(Utilities.AzurePowershellModuleServiceManagementPreviewModule, Utilities.windowsAzurePowershellDefaultPath),
30+
new PowershellModule(Utilities.AzurePowershellProfileModule, Utilities.AzurePowershellPath),
31+
new PowershellModule(Utilities.AzurePowershellServiceManagementModule, Utilities.AzurePowershellPath),
32+
new PowershellModule(Utilities.AzurePowershellCommandsModule, Utilities.AzurePowershellPath),
33+
new PowershellModule(Utilities.AzurePowershellStorageModule, Utilities.AzurePowershellPath),
34+
new PowershellModule(Utilities.AzurePowershellModuleServiceManagementPirModule, Utilities.AzurePowershellPath),
35+
new PowershellModule(Utilities.AzurePowershellModuleServiceManagementPreviewModule, Utilities.AzurePowershellPath),
4636
};
4737
return modules;
4838
}

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellScript.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,21 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests
2020
{
2121
public class WindowsAzurePowershellScript : PowershellCmdletScript
2222
{
23-
private static readonly string[] modules = new[]
24-
{
25-
Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellServiceModule)
26-
};
27-
2823
public WindowsAzurePowershellScript(List<string> cmdlets) : base(cmdlets, ConstructModules())
2924
{
3025
}
3126
public WindowsAzurePowershellScript() : base(ConstructModules())
3227
{
3328
}
3429

35-
public static string[] Modules
36-
{
37-
get
38-
{
39-
return modules;
40-
}
41-
}
42-
4330
private static PowershellModule[] ConstructModules()
4431
{
4532
return new[]
4633
{
47-
new PowershellModule(Utilities.windowsAzurePowershellServiceModule, Utilities.windowsAzurePowershellPath)
34+
new PowershellModule(Utilities.AzurePowershellProfileModule, Utilities.AzurePowershellPath),
35+
new PowershellModule(Utilities.AzurePowershellCommandsModule, Utilities.AzurePowershellPath),
36+
new PowershellModule(Utilities.AzurePowershellStorageModule, Utilities.AzurePowershellPath),
37+
new PowershellModule(Utilities.AzurePowershellServiceManagementModule, Utilities.AzurePowershellPath)
4838
};
4939
}
5040
}

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Utilities.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ internal class Utilities
3939
{
4040
#region Constants
4141

42-
public static string windowsAzurePowershellPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ServiceManagement\\Azure");
43-
public static string windowsAzurePowershellDefaultPath = AppDomain.CurrentDomain.BaseDirectory;
42+
public static string AzurePowershellPath = AppDomain.CurrentDomain.BaseDirectory;
4443

45-
public const string windowsAzurePowershellServiceModule = "Azure.psd1";
44+
public const string AzurePowershellProfileModule = "Microsoft.WindowsAzure.Commands.Profile.dll";
45+
public const string AzurePowershellCommandsModule = "Microsoft.WindowsAzure.Commands.dll";
46+
public const string AzurePowershellStorageModule = "Microsoft.WindowsAzure.Commands.Storage.dll";
47+
public const string AzurePowershellServiceManagementModule = "Microsoft.WindowsAzure.Commands.ServiceManagement.dll";
4648
public const string AzurePowershellModuleServiceManagementPirModule = "Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll";
4749
public const string AzurePowershellModuleServiceManagementPreviewModule = "Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.dll";
4850

src/ServiceManagement/Services/Commands.Utilities/ServiceManagementStartup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ $script:aliases = @{
5151
"Remove-WAPackSBNamespace" = "Remove-AzureSBNamespace";
5252

5353
# Compute aliases
54-
"New-AzureDns" = "New-AzureDnsConfig";
54+
"New-AzureDnsConfig" = "New-AzureDns";
5555

5656
# HDInsight aliases
5757
"Invoke-Hive" = "Invoke-AzureHDInsightHiveJob";

0 commit comments

Comments
 (0)