|
| 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 Microsoft.WindowsAzure.Commands.ScenarioTest; |
| 16 | +using Xunit; |
| 17 | + |
| 18 | +namespace Microsoft.Azure.Commands.Automation.Test |
| 19 | +{ |
| 20 | + public class AutomationTests : AutomationScenarioTestsBase |
| 21 | + { |
| 22 | + [Fact(Skip = "Fix to make x86 compatible.")] |
| 23 | + [Trait(Category.AcceptanceType, Category.CheckIn)] |
| 24 | + [Trait(Category.Service, Category.Automation)] |
| 25 | + public void TestAutomationStartAndStopRunbook() |
| 26 | + { |
| 27 | + RunPowerShellTest("Test-AutomationStartAndStopRunbook -runbookPath ScenarioTests\\Resources\\Test-Workflow.ps1"); |
| 28 | + } |
| 29 | + |
| 30 | + [Fact(Skip = "Fix to make x86 compatible.")] |
| 31 | + [Trait(Category.AcceptanceType, Category.CheckIn)] |
| 32 | + [Trait(Category.Service, Category.Automation)] |
| 33 | + public void TestAutomationPublishAndEditRunbook() |
| 34 | + { |
| 35 | + RunPowerShellTest("Test-AutomationPublishAndEditRunbook -runbookPath ScenarioTests\\Resources\\Test-Workflow.ps1 -editRunbookPath Resources\\Automation\\Test-WorkflowV2.ps1"); |
| 36 | + } |
| 37 | + |
| 38 | + [Fact(Skip = "Fix to make x86 compatible.")] |
| 39 | + [Trait(Category.AcceptanceType, Category.CheckIn)] |
| 40 | + [Trait(Category.Service, Category.Automation)] |
| 41 | + public void TestAutomationConfigureRunbook() |
| 42 | + { |
| 43 | + RunPowerShellTest("Test-AutomationConfigureRunbook -runbookPath ScenarioTests\\Resources\\Write-DebugAndVerboseOutput.ps1"); |
| 44 | + } |
| 45 | + |
| 46 | + [Fact] |
| 47 | + [Trait(Category.Service, Category.Automation)] |
| 48 | + [Trait(Category.RunType, Category.LiveOnly)] |
| 49 | + public void TestAutomationSuspendAndResumeJob() |
| 50 | + { |
| 51 | + RunPowerShellTest("Test-AutomationSuspendAndResumeJob -runbookPath ScenarioTests\\Resources\\Use-WorkflowCheckpointSample.ps1"); |
| 52 | + } |
| 53 | + |
| 54 | + [Fact] |
| 55 | + [Trait(Category.Service, Category.Automation)] |
| 56 | + [Trait(Category.RunType, Category.LiveOnly)] |
| 57 | + public void TestAutomationStartRunbookOnASchedule() |
| 58 | + { |
| 59 | + RunPowerShellTest("Test-AutomationStartRunbookOnASchedule -runbookPath ScenarioTests\\Resources\\Test-Workflow.ps1"); |
| 60 | + } |
| 61 | + |
| 62 | + [Fact(Skip = "Fix to make x86 compatible.")] |
| 63 | + [Trait(Category.AcceptanceType, Category.CheckIn)] |
| 64 | + [Trait(Category.Service, Category.Automation)] |
| 65 | + public void TestAutomationStartUnpublishedRunbook() |
| 66 | + { |
| 67 | + RunPowerShellTest("Test-AutomationStartUnpublishedRunbook -runbookPath ScenarioTests\\Resources\\Test-WorkFlowWithVariousParameters.ps1"); |
| 68 | + } |
| 69 | + |
| 70 | + [Fact(Skip = "Fix to make x86 compatible.")] |
| 71 | + [Trait(Category.AcceptanceType, Category.CheckIn)] |
| 72 | + [Trait(Category.Service, Category.Automation)] |
| 73 | + public void TestAutomationRunbookWithParameter() |
| 74 | + { |
| 75 | + RunPowerShellTest("Test-RunbookWithParameter -runbookPath ScenarioTests\\Resources\\fastJob.ps1 @{'nums'='[1,2,3,4,5,6,7]'} 28"); |
| 76 | + } |
| 77 | + } |
| 78 | +} |
0 commit comments