Skip to content

Commit 0a4559a

Browse files
committed
Changes to xScheduleTask
Change to `TestDrive$` variable in integration tests
1 parent 0b47335 commit 0a4559a

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

DSCResource.Tests

Lines changed: 0 additions & 1 deletion
This file was deleted.

Tests/Integration/MSFT_xScheduledTask.Integration.Tests.ps1

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ try
2828

2929
Context "No scheduled task exists, but it should" {
3030
$CurrentConfig = "xScheduledTask_Add"
31-
$ConfigDir = (Join-Path $TestEnvironment.WorkingFolder $CurrentConfig)
31+
$ConfigDir = (Join-Path $TestDrive $CurrentConfig)
3232
$ConfigMof = (Join-Path $ConfigDir "localhost.mof")
3333

3434
It "should compile a MOF file without error" {
@@ -50,7 +50,7 @@ try
5050

5151
Context "A scheduled task with minutes based repetition exists, but has the wrong settings" {
5252
$CurrentConfig = "xScheduledTask_Edit1"
53-
$ConfigDir = (Join-Path $TestEnvironment.WorkingFolder $CurrentConfig)
53+
$ConfigDir = (Join-Path $TestDrive $CurrentConfig)
5454
$ConfigMof = (Join-Path $ConfigDir "localhost.mof")
5555

5656
It "should compile a MOF file without error" {
@@ -72,7 +72,7 @@ try
7272

7373
Context "A scheduled task with hourly based repetition exists, but has the wrong settings" {
7474
$CurrentConfig = "xScheduledTask_Edit2"
75-
$ConfigDir = (Join-Path $TestEnvironment.WorkingFolder $CurrentConfig)
75+
$ConfigDir = (Join-Path $TestDrive $CurrentConfig)
7676
$ConfigMof = (Join-Path $ConfigDir "localhost.mof")
7777

7878
It "should compile a MOF file without error" {
@@ -94,7 +94,7 @@ try
9494

9595
Context "A scheduled task with daily based repetition exists, but has the wrong settings" {
9696
$CurrentConfig = "xScheduledTask_Edit3"
97-
$ConfigDir = (Join-Path $TestEnvironment.WorkingFolder $CurrentConfig)
97+
$ConfigDir = (Join-Path $TestDrive $CurrentConfig)
9898
$ConfigMof = (Join-Path $ConfigDir "localhost.mof")
9999

100100
It "should compile a MOF file without error" {
@@ -116,7 +116,7 @@ try
116116

117117
Context "A scheduled task exists and is configured with the wrong working directory" {
118118
$CurrentConfig = "xScheduledTask_Edit4"
119-
$ConfigDir = (Join-Path $TestEnvironment.WorkingFolder $CurrentConfig)
119+
$ConfigDir = (Join-Path $TestDrive $CurrentConfig)
120120
$ConfigMof = (Join-Path $ConfigDir "localhost.mof")
121121

122122
It "should compile a MOF file without error" {
@@ -138,7 +138,7 @@ try
138138

139139
Context "A scheduled task exists and is configured with the wrong executable arguments" {
140140
$CurrentConfig = "xScheduledTask_Edit5"
141-
$ConfigDir = (Join-Path $TestEnvironment.WorkingFolder $CurrentConfig)
141+
$ConfigDir = (Join-Path $TestDrive $CurrentConfig)
142142
$ConfigMof = (Join-Path $ConfigDir "localhost.mof")
143143

144144
It "should compile a MOF file without error" {
@@ -160,7 +160,7 @@ try
160160

161161
Context "A scheduled task exists, but it shouldn't" {
162162
$CurrentConfig = "xScheduledTask_Remove"
163-
$ConfigDir = (Join-Path $TestEnvironment.WorkingFolder $CurrentConfig)
163+
$ConfigDir = (Join-Path $TestDrive $CurrentConfig)
164164
$ConfigMof = (Join-Path $ConfigDir "localhost.mof")
165165

166166
It "should compile a MOF file without error" {
@@ -182,7 +182,7 @@ try
182182

183183
Context "A scheduled task exists, and should be enabled" {
184184
$CurrentConfig = "xScheduledTask_Enable"
185-
$ConfigDir = (Join-Path $TestEnvironment.WorkingFolder $CurrentConfig)
185+
$ConfigDir = (Join-Path $TestDrive $CurrentConfig)
186186
$ConfigMof = (Join-Path $ConfigDir "localhost.mof")
187187

188188
It "should compile a MOF file without error" {
@@ -204,7 +204,7 @@ try
204204

205205
Context "A scheduled task exists, and should be disabled" {
206206
$CurrentConfig = "xScheduledTask_Disable"
207-
$ConfigDir = (Join-Path $TestEnvironment.WorkingFolder $CurrentConfig)
207+
$ConfigDir = (Join-Path $TestDrive $CurrentConfig)
208208
$ConfigMof = (Join-Path $ConfigDir "localhost.mof")
209209

210210
It "should compile a MOF file without error" {

0 commit comments

Comments
 (0)