Skip to content

Commit 3c963eb

Browse files
committed
Moved tests to a shorter namespace. Loaded correct Profile version. Fixed cmdlet name bug in Remove-AzAutomationSoftwareUpdateConfiguration. Updated cmdlet alias mappings. Updated version of ResourceManager sdk used by Automation and Resources (and all test projects). Updated Automation sdk in TestPrerequisites.
1 parent bdf12ce commit 3c963eb

27 files changed

+2291
-2253
lines changed

src/ResourceManager/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -166,52 +166,52 @@
166166
<Content Include="SessionRecords\Commands.Automation.Test.HybridWorkerGroupTests\E2EHybridWorkerGroup.json">
167167
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
168168
</Content>
169-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\CreateLinuxWeeklySUC.json">
169+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\CreateLinuxWeeklySUC.json">
170170
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
171171
</Content>
172-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\CreateWindowsMonthlySUC.json">
172+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\CreateWindowsMonthlySUC.json">
173173
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
174174
</Content>
175-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\CreateLinuxOneTimeSUCNonAzureOnly.json">
175+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\CreateLinuxOneTimeSUCNonAzureOnly.json">
176176
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
177177
</Content>
178-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\CreateLinuxOneTimeSUCWithAllOption.json">
178+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\CreateLinuxOneTimeSUCWithAllOption.json">
179179
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
180180
</Content>
181-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\CreateLinuxOneTimeSUCWithDefaults.json">
181+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\CreateLinuxOneTimeSUCWithDefaults.json">
182182
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
183183
</Content>
184-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\CreateWindowsOneTimeSUCWithAllOption.json">
184+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\CreateWindowsOneTimeSUCWithAllOption.json">
185185
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
186186
</Content>
187-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\CreateWindowsOneTimeSUCWithDefaults.json">
187+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\CreateWindowsOneTimeSUCWithDefaults.json">
188188
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
189189
</Content>
190-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\DeleteSUC.json">
190+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\DeleteSUC.json">
191191
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
192192
</Content>
193-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\GetAllMachineRuns.json">
193+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\GetAllMachineRuns.json">
194194
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
195195
</Content>
196-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\GetAllMachineRunsWithFilters.json">
196+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\GetAllMachineRunsWithFilters.json">
197197
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
198198
</Content>
199-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\GetAllMachineRunsWithFiltersNoResults.json">
199+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\GetAllMachineRunsWithFiltersNoResults.json">
200200
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
201201
</Content>
202-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\GetAllRuns.json">
202+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\GetAllRuns.json">
203203
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
204204
</Content>
205-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\GetAllRunsWithFilters.json">
205+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\GetAllRunsWithFilters.json">
206206
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
207207
</Content>
208-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\GetAllRunsWithFiltersNoResults.json">
208+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\GetAllRunsWithFiltersNoResults.json">
209209
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
210210
</Content>
211-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\GetAllSUCs.json">
211+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\GetAllSUCs.json">
212212
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
213213
</Content>
214-
<Content Include="SessionRecords\Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement.UpdateManagementTests\GetAllSUCsForVM.json">
214+
<Content Include="SessionRecords\Commands.Automation.Test.UpdateManagementTests\GetAllSUCsForVM.json">
215215
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
216216
</Content>
217217
</ItemGroup>

src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/AutomationScenarioTestsBase.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,12 @@ protected void RunPowerShellTest(XunitTracingInterceptor logger, params string[]
5151
{
5252
SetupManagementClients(context);
5353

54-
_helper.SetupEnvironment(AzureModule.AzureResourceManager);
55-
5654
var callingClassName = callingClassType?
5755
.Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries)
5856
.Last();
5957

6058
var scriptLocation = Path.Combine("ScenarioTests", callingClassName + ".ps1");
6159
_helper.SetupModules(
62-
AzureModule.AzureResourceManager,
6360
scriptLocation,
6461
_helper.RMProfileModule,
6562
_helper.GetRMModulePath(@"AzureRM.Automation.psd1"));

src/ResourceManager/Automation/Commands.Automation.Test/ScenarioTests/UpdateManagementTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
namespace Microsoft.Azure.Commands.ResourceManager.Automation.Test.ScenarioTests.UpdateManagement
15+
namespace Commands.Automation.Test
1616
{
1717
using Microsoft.Azure.Commands.Automation.Test;
1818
using Microsoft.WindowsAzure.Commands.ScenarioTest;

src/ResourceManager/Automation/Commands.Automation/Az.Automation.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'Az.Profile'; ModuleVersion = '0.4.0'; })
54+
RequiredModules = @(@{ModuleName = 'Az.Profile'; ModuleVersion = '0.2.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = '.\Microsoft.Azure.Management.Automation.dll', '.\Microsoft.Azure.Management.ResourceManager.dll'

src/ResourceManager/Automation/Commands.Automation/Cmdlet/UpdateManagement/RemoveAzureAutomationSoftwareUpdateConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet.UpdateManagement
2525
/// <summary>
2626
/// Removes a Certificate for automation.
2727
/// </summary>
28-
[Cmdlet(VerbsCommon.Remove, "AzureRmAutomationSoftwareUpdateConfiguration", SupportsShouldProcess = true,
28+
[Cmdlet(VerbsCommon.Remove, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "AutomationSoftwareUpdateConfiguration", SupportsShouldProcess = true,
2929
DefaultParameterSetName = AutomationCmdletParameterSets.BySucName)]
3030
[OutputType(typeof(void), typeof(bool))]
3131
public class RemoveAzureAutomationSoftwareUpdateConfiguration : AzureAutomationBaseCmdlet

src/ResourceManager/Automation/Commands.Automation/Common/AutomationPSClientDSC.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ public void RegisterDscNode(string resourceGroupName,
816816
agentRegistrationInfo.PrimaryKey);
817817

818818
var armClient = AzureSession.Instance.ClientFactory.CreateArmClient<ResourceManagementClient>(azureContext, AzureEnvironment.Endpoint.ResourceManager);
819-
819+
820820
var deployment = new Management.ResourceManager.Models.Deployment
821821
{
822822
Properties = new Management.ResourceManager.Models.DeploymentProperties
@@ -826,8 +826,8 @@ public void RegisterDscNode(string resourceGroupName,
826826
}
827827
};
828828

829-
armClient.Deployments.CreateOrUpdate(azureVmResourceGroup, Guid.NewGuid().ToString(), deployment);
830-
829+
armClient.Deployments.CreateOrUpdate(azureVmResourceGroup, Guid.NewGuid().ToString(), deployment);
830+
831831
}
832832

833833
private string GetDSCDeploymenttemplateParameters(string resourceGroupName,

0 commit comments

Comments
 (0)