Skip to content

Commit aa04483

Browse files
author
Andrew
committed
updated test
1 parent cef4bd5 commit aa04483

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

powershell-adapter/Tests/powershellgroup.resource.tests.ps1

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ Describe 'PowerShell adapter resource tests' {
134134
$srcPath = Join-Path $PSScriptRoot 'TestClassResource'
135135
$pathRoot1 = Join-Path $TestDrive 'A'
136136
$pathRoot2 = Join-Path $TestDrive 'B'
137-
$path1 = Join-Path $pathRoot1 'TestClassResource' '0.0.1'
138-
$path2 = Join-Path $pathRoot1 'TestClassResource' '0.0.2'
139-
$path3 = Join-Path $pathRoot2 'TestClassResource' '0.0.3'
140-
$path4 = Join-Path $pathRoot2 'TestClassResource' '0.0.4'
137+
$path1 = Join-Path $pathRoot1 'TestClassResource' '1.0'
138+
$path2 = Join-Path $pathRoot1 'TestClassResource' '1.1'
139+
$path3 = Join-Path $pathRoot2 'TestClassResource' '2.0'
140+
$path4 = Join-Path $pathRoot2 'TestClassResource' '2.0.1'
141141

142142
New-Item -ItemType Directory -Force -Path $path1 | Out-Null
143143
New-Item -ItemType Directory -Force -Path $path2 | Out-Null
@@ -151,13 +151,13 @@ Describe 'PowerShell adapter resource tests' {
151151
$files | Copy-Item -Destination $path4
152152

153153
$filePath = Join-Path $path1 'TestClassResource.psd1'
154-
(Get-Content -Raw $filePath).Replace("ModuleVersion = `'0.0.1`'", "ModuleVersion = `'0.0.1`'") | Set-Content $filePath
154+
(Get-Content -Raw $filePath).Replace("ModuleVersion = `'0.0.1`'", "ModuleVersion = `'1.0`'") | Set-Content $filePath
155155
$filePath = Join-Path $path2 'TestClassResource.psd1'
156-
(Get-Content -Raw $filePath).Replace("ModuleVersion = `'0.0.1`'", "ModuleVersion = `'0.0.2`'") | Set-Content $filePath
156+
(Get-Content -Raw $filePath).Replace("ModuleVersion = `'0.0.1`'", "ModuleVersion = `'1.1`'") | Set-Content $filePath
157157
$filePath = Join-Path $path3 'TestClassResource.psd1'
158-
(Get-Content -Raw $filePath).Replace("ModuleVersion = `'0.0.1`'", "ModuleVersion = `'0.0.3`'") | Set-Content $filePath
158+
(Get-Content -Raw $filePath).Replace("ModuleVersion = `'0.0.1`'", "ModuleVersion = `'2.0`'") | Set-Content $filePath
159159
$filePath = Join-Path $path4 'TestClassResource.psd1'
160-
(Get-Content -Raw $filePath).Replace("ModuleVersion = `'0.0.1`'", "ModuleVersion = `'0.0.4`'") | Set-Content $filePath
160+
(Get-Content -Raw $filePath).Replace("ModuleVersion = `'0.0.1`'", "ModuleVersion = `'2.0.1`'") | Set-Content $filePath
161161

162162

163163
$oldPath = $env:PSModulePath
@@ -170,7 +170,7 @@ Describe 'PowerShell adapter resource tests' {
170170
$resources = $r | ConvertFrom-Json
171171
$r = @($resources | ? {$_.Type -eq 'TestClassResource/TestClassResource'})
172172
$r.Count | Should -Be 1
173-
$r[0].Version | Should -Be '0.0.4'
173+
$r[0].Version | Should -Be '2.0.1'
174174
}
175175
finally {
176176
$env:PSModulePath = $oldPath

0 commit comments

Comments
 (0)