Skip to content

Commit 60b700f

Browse files
committed
fix test
1 parent 3a38da4 commit 60b700f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

jumpcloud-ADMU/Powershell/Start-Migration.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2172,7 +2172,7 @@ Function Start-Migration {
21722172
}
21732173
throw "JumpCloud ADMU was unable to migrate $selectedUserName"
21742174
}
2175-
$ScheduledTasks = Get-ScheduledTask | Where-Object { $_.TaskPath -notlike "*\Microsoft\Windows*"}
2175+
# Create a list of scheduled tasks that are disabled
21762176
try {
21772177
$scheduledTasks | ForEach-Object {
21782178
Write-ToLog -message("Enabling Scheduled Task: $($_.TaskName)")

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ Describe 'Migration Test Scenarios' {
8686
{ Start-Migration -AutobindJCUser $false -JumpCloudUserName $user2 -SelectedUserName "$ENV:COMPUTERNAME\$user1" -TempPassword "$($Password)" } | Should -Not -Throw
8787
# Get the scheduled task
8888
$task = Get-ScheduledTask -TaskName "TestTaskDisabled"
89-
# Task state should be ready
90-
$task.State | Should -Be "Ready"
89+
# Task state should still be disabled
90+
$task.State | Should -Be "Disabled"
9191
}
9292
It "Test Convert profile migration for Local users" {
9393
foreach ($user in $userTestingHash.Values) {
@@ -191,7 +191,6 @@ Describe 'Migration Test Scenarios' {
191191
}
192192
It "Failed migration should revert original scheduled tasks state" {
193193
$task = Get-ScheduledTask -TaskName "TestTaskFail"
194-
Get-ScheduledTask
195194
# Task state should be ready
196195
$task.State | Should -Be "Ready"
197196
}

0 commit comments

Comments
 (0)