Skip to content

Commit ddb956d

Browse files
committed
Merge branch 'SA-3471-ADMU-Disable-Scheduled-Tasks' of https://github.com/TheJumpCloud/jumpcloud-ADMU into SA-3471-ADMU-Disable-Scheduled-Tasks
2 parents 9b21581 + 851379d commit ddb956d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

jumpcloud-ADMU/Powershell/Tests/Migration.Tests.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ function Enable-TestNameAsVariablePlugin {
1212
$state.Plugin += New-PluginObject @PluginParams
1313
}
1414
}
15-
15+
# Add test name as variable
16+
# https://github.com/pester/Pester/issues/1611
1617
BeforeAll {
1718
# import build variables for test cases
1819
write-host "Importing Build Variables:"
@@ -64,7 +65,7 @@ Describe 'Migration Test Scenarios' {
6465
}
6566
}
6667

67-
It "Tests for the Scheduled Task already enabled" {
68+
It "Tests that a previously enabled Scheduled Task is enabled at the end of user migration" {
6869
# Create a scheduled task
6970
$action = New-ScheduledTaskAction -Execute "powershell.exe"
7071
$trigger = New-ScheduledTaskTrigger -AtLogon
@@ -87,7 +88,7 @@ Describe 'Migration Test Scenarios' {
8788

8889

8990
}
90-
It "Tests for the Scheduled Task disabled" {
91+
It "Tests that a previously disable Scheduled Task is disabled after migration" {
9192
# Task should be enabled after migration
9293
# Create a scheduled task
9394
$action = New-ScheduledTaskAction -Execute "powershell.exe"
@@ -159,7 +160,7 @@ Describe 'Migration Test Scenarios' {
159160
Remove-Item $logPath
160161
New-Item $logPath -Force -ItemType File
161162
}
162-
It "Tests that the tool can recover when the start migration script fails" {
163+
It "Tests that the tool can recover when the start migration script fails and that scheduled tasks are returned to their previous state" {
163164

164165
# This test contains a job which will load the migration user's profile
165166
# into memory and effectively break the migration process. This test

0 commit comments

Comments
 (0)