Skip to content

Dev: Azure Automation additional cmdlet bugfixes #1714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Jan 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e58bbf8
new cmdlet: delete dsc config
balukambala Dec 1, 2015
c0af461
sln merge fix
balukambala Dec 1, 2015
f732887
fixed code review comments
balukambala Dec 2, 2015
e375c18
Updated display message while deleting the config
balukambala Dec 18, 2015
b379fd8
Added cmdlet to delete Node configuration
balukambala Dec 18, 2015
cb1c81e
Updated help message
balukambala Dec 18, 2015
0d3cd53
Added flag IgnoreNodeMappings
balukambala Dec 18, 2015
ce2ffc2
Deleting node config if there is no mapping also without switch param…
balukambala Dec 21, 2015
8c93c76
Start-AARunbook with Wait
safeermohammed Jan 4, 2016
9b4d8c1
Add Subscription ID property
Bpoe Jan 7, 2016
905d3bb
Merge pull request #12 from Bpoe/dev
safeermohammed Jan 8, 2016
07ae246
Disabling passing Parameters value from pipeline per Bug 1731159
Bpoe Jan 11, 2016
6c9059d
Merge pull request #13 from Bpoe/dev
safeermohammed Jan 11, 2016
b6971e9
-wait with object
safeermohammed Jan 13, 2016
0e2dd8d
Removing StartedBy param addition. Adding StartedBy property to job o…
Bpoe Jan 13, 2016
0dd816c
Merge pull request #1 from AzureAutomationTeam/dev
Bpoe Jan 13, 2016
75c7647
string change
safeermohammed Jan 14, 2016
d72ac68
Latest changes from team
safeermohammed Jan 14, 2016
56bdd81
Reverted the nuget package id
balukambala Jan 14, 2016
65926d3
Merge pull request #14 from Bpoe/dev
safeermohammed Jan 15, 2016
ef5e61a
Start-AACmdlet Timeout to 10800
safeermohammed Jan 20, 2016
6aba7e4
Merge branch 'dev' of https://github.com/AzureAutomationTeam/azure-po…
safeermohammed Jan 20, 2016
363e815
Merge pull request #15 from balukambala/dev
safeermohammed Jan 22, 2016
a8d71d9
Added scenario tests for Azure automation
balukambala Jan 25, 2016
024d42f
Merge branch 'dev' of https://github.com/AzureAutomationTeam/azure-po…
balukambala Jan 25, 2016
6c6ca2d
made changes to fix nodeid/reportid issue
balukambala Jan 25, 2016
0c240ce
fixed spelling
balukambala Jan 25, 2016
a0a4924
fixed test cmdlets to use new version 'Rm'
balukambala Jan 25, 2016
862f6ce
Merge pull request #16 from balukambala/dev
safeermohammed Jan 26, 2016
c9a7419
Resolving Merge Conflixt
safeermohammed Jan 26, 2016
9c23be2
Fixing test project reference
safeermohammed Jan 26, 2016
192d3f2
Addressed review comments
safeermohammed Jan 26, 2016
9313bd9
Changed skip message to need x64 test framework per azure team
safeermohammed Jan 27, 2016
09e5d63
fixed Commands.Automation.Test test dll reference.
safeermohammed Jan 27, 2016
776ad94
fixed Commands.Automation.Test test dll reference for system.managame…
safeermohammed Jan 27, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,20 @@
<Reference Include="Microsoft.Azure.Common.NetFramework">
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Automation">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Automation.2.0.0\lib\net40\Microsoft.Azure.Management.Automation.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Test.Framework, Version=1.0.5799.28345, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5799.28345-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory">
<SpecificVersion>False</SpecificVersion>
Expand Down Expand Up @@ -112,7 +119,9 @@
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Extensions, Version=2.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Expand All @@ -135,6 +144,8 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ScenarioTests\AutomationScenarioTestsBase.cs" />
<Compile Include="ScenarioTests\AutomationTests.cs" />
<Compile Include="UnitTests\GetAzureAutomationCertificateTest.cs" />
<Compile Include="UnitTests\GetAzureAutomationConnectionTest.cs" />
<Compile Include="UnitTests\GetAzureAutomationCredentialTest.cs" />
Expand Down Expand Up @@ -195,6 +206,28 @@
<ItemGroup>
<None Include="MSSharedLibKey.snk" />
<None Include="packages.config" />
<None Include="ScenarioTests\AutomationTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\Resources\fastjob.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\Resources\Test-Workflow.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\Resources\Test-WorkflowV2.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\Resources\Test-WorkFlowWithVariousParameters.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\Resources\Use-WorkflowCheckpointSample.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\Resources\Write-DebugAndVerboseOutput.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Common.Authentication;
using Microsoft.Azure.Management.Resources;
using Microsoft.Azure.Subscriptions;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.Azure.Test;
using Microsoft.Azure.Management.Automation;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;

namespace Microsoft.Azure.Commands.Automation.Test
{
public abstract class AutomationScenarioTestsBase : RMTestBase
{
private EnvironmentSetupHelper helper;

protected AutomationScenarioTestsBase()
{
helper = new EnvironmentSetupHelper();
}

protected void SetupManagementClients()
{
var automationManagementClient = GetAutomationManagementClient();

helper.SetupManagementClients(automationManagementClient);
}

protected void RunPowerShellTest(params string[] scripts)
{
using (UndoContext context = UndoContext.Current)
{
context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2));

SetupManagementClients();

helper.SetupEnvironment(AzureModule.AzureResourceManager);

helper.SetupModules(AzureModule.AzureResourceManager,
"ScenarioTests\\" + this.GetType().Name + ".ps1",
helper.RMProfileModule,
helper.GetRMModulePath(@"AzureRM.Automation.psd1"));

helper.RunPowerShellTest(scripts);
}
}

protected AutomationManagementClient GetAutomationManagementClient()
{
return TestBase.GetServiceClient<AutomationManagementClient>(new CSMTestEnvironmentFactory());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Xunit;

namespace Microsoft.Azure.Commands.Automation.Test
{
public class AutomationTests : AutomationScenarioTestsBase
{
[Fact(Skip = "Need x64 test framework.")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Service, Category.Automation)]
public void TestAutomationStartAndStopRunbook()
{
RunPowerShellTest("Test-AutomationStartAndStopRunbook -runbookPath ScenarioTests\\Resources\\Test-Workflow.ps1");
}

[Fact(Skip = "Need x64 test framework.")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Service, Category.Automation)]
public void TestAutomationPublishAndEditRunbook()
{
RunPowerShellTest("Test-AutomationPublishAndEditRunbook -runbookPath ScenarioTests\\Resources\\Test-Workflow.ps1 -editRunbookPath Resources\\Automation\\Test-WorkflowV2.ps1");
}

[Fact(Skip = "Need x64 test framework.")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Service, Category.Automation)]
public void TestAutomationConfigureRunbook()
{
RunPowerShellTest("Test-AutomationConfigureRunbook -runbookPath ScenarioTests\\Resources\\Write-DebugAndVerboseOutput.ps1");
}

[Fact]
[Trait(Category.Service, Category.Automation)]
[Trait(Category.RunType, Category.LiveOnly)]
public void TestAutomationSuspendAndResumeJob()
{
RunPowerShellTest("Test-AutomationSuspendAndResumeJob -runbookPath ScenarioTests\\Resources\\Use-WorkflowCheckpointSample.ps1");
}

[Fact]
[Trait(Category.Service, Category.Automation)]
[Trait(Category.RunType, Category.LiveOnly)]
public void TestAutomationStartRunbookOnASchedule()
{
RunPowerShellTest("Test-AutomationStartRunbookOnASchedule -runbookPath ScenarioTests\\Resources\\Test-Workflow.ps1");
}

[Fact(Skip = "Need x64 test framework.")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Service, Category.Automation)]
public void TestAutomationStartUnpublishedRunbook()
{
RunPowerShellTest("Test-AutomationStartUnpublishedRunbook -runbookPath ScenarioTests\\Resources\\Test-WorkFlowWithVariousParameters.ps1");
}

[Fact(Skip = "Need x64 test framework.")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Service, Category.Automation)]
public void TestAutomationRunbookWithParameter()
{
RunPowerShellTest("Test-RunbookWithParameter -runbookPath ScenarioTests\\Resources\\fastJob.ps1 @{'nums'='[1,2,3,4,5,6,7]'} 28");
}
}
}
Loading