File tree Expand file tree Collapse file tree 6 files changed +17
-18
lines changed Expand file tree Collapse file tree 6 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Describe 'PowerShell adapter resource tests' {
5
5
6
6
BeforeAll {
7
7
if ($isWindows ) {
8
- # winrm quickconfig -quiet -force
8
+ winrm quickconfig - quiet - force
9
9
}
10
10
$OldPSModulePath = $env: PSModulePath
11
11
$env: PSModulePath += [System.IO.Path ]::PathSeparator + $PSScriptRoot
@@ -26,16 +26,15 @@ Describe 'PowerShell adapter resource tests' {
26
26
$res.results [0 ].result.actualState.result[1 ].properties.EnumProp | Should - BeExactly ' Expected'
27
27
}
28
28
29
- <# It 'Get works on config with File resource for WinPS' -Skip:(!$IsWindows){
29
+ It ' Get works on config with File resource for WinPS' - Skip:(! $IsWindows ){
30
30
31
31
$testFile = " $testdrive \test.txt"
32
32
' test' | Set-Content - Path $testFile - Force
33
33
$r = (Get-Content - Raw $winpsConfigPath ).Replace(' c:\test.txt' , " $testFile " ) | dsc config get
34
34
$LASTEXITCODE | Should - Be 0
35
35
$res = $r | ConvertFrom-Json
36
36
$res.results [0 ].result.actualState.result[0 ].properties.DestinationPath | Should - Be " $testFile "
37
- }#>
38
-
37
+ }
39
38
40
39
It ' Test works on config with class-based and script-based resources' - Skip:(! $IsWindows ){
41
40
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Describe 'PowerShell adapter resource tests' {
5
5
6
6
BeforeAll {
7
7
if ($isWindows ) {
8
- # winrm quickconfig -quiet -force
8
+ winrm quickconfig - quiet - force
9
9
}
10
10
$OldPSModulePath = $env: PSModulePath
11
11
$env: PSModulePath += [System.IO.Path ]::PathSeparator + $PSScriptRoot
Original file line number Diff line number Diff line change 1
- powershell.resource.ps1
1
+ ./psDscAdapter/ powershell.resource.ps1
2
2
./psDscAdapter/psDscAdapter.psd1
3
3
./psDscAdapter/psDscAdapter.psm1
Original file line number Diff line number Diff line change 15
15
" -NonInteractive" ,
16
16
" -NoProfile" ,
17
17
" -Command" ,
18
- " ./powershell.resource.ps1 List"
18
+ " ./psDscAdapter/ powershell.resource.ps1 List"
19
19
]
20
20
},
21
21
"config" : " full"
27
27
" -NonInteractive" ,
28
28
" -NoProfile" ,
29
29
" -Command" ,
30
- " $Input | ./powershell.resource.ps1 Get"
30
+ " $Input | ./psDscAdapter/ powershell.resource.ps1 Get"
31
31
],
32
32
"input" : " stdin"
33
33
},
38
38
" -NonInteractive" ,
39
39
" -NoProfile" ,
40
40
" -Command" ,
41
- " $Input | ./powershell.resource.ps1 Set"
41
+ " $Input | ./psDscAdapter/ powershell.resource.ps1 Set"
42
42
],
43
43
"input" : " stdin" ,
44
44
"implementsPretest" : true ,
51
51
" -NonInteractive" ,
52
52
" -NoProfile" ,
53
53
" -Command" ,
54
- " $Input | ./powershell.resource.ps1 Test"
54
+ " $Input | ./psDscAdapter/ powershell.resource.ps1 Test"
55
55
],
56
56
"input" : " stdin" ,
57
57
"return" : " state"
63
63
" -NonInteractive" ,
64
64
" -NoProfile" ,
65
65
" -Command" ,
66
- " $Input | ./powershell.resource.ps1 Export"
66
+ " $Input | ./psDscAdapter/ powershell.resource.ps1 Export"
67
67
],
68
68
"input" : " stdin" ,
69
69
"return" : " state"
75
75
" -NonInteractive" ,
76
76
" -NoProfile" ,
77
77
" -Command" ,
78
- " $Input | ./powershell.resource.ps1 Validate"
78
+ " $Input | ./psDscAdapter/ powershell.resource.ps1 Validate"
79
79
],
80
80
"input" : " stdin"
81
81
},
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ if ('Validate' -ne $Operation) {
15
15
$host.ui.WriteErrorLine ($trace )
16
16
17
17
# load private functions of psDscAdapter stub module
18
- $psDscAdapter = Import-Module " $PSScriptRoot /psDscAdapter/psDscAdapter .psd1" - Force - PassThru
18
+ $psDscAdapter = Import-Module " $PSScriptRoot /psDscAdapter.psd1" - Force - PassThru
19
19
20
20
# initialize OUTPUT as array
21
21
$result = [System.Collections.Generic.List [Object ]]::new()
Original file line number Diff line number Diff line change 15
15
" -NonInteractive" ,
16
16
" -NoProfile" ,
17
17
" -Command" ,
18
- " ./powershell.resource.ps1 List"
18
+ " ./psDscAdapter/ powershell.resource.ps1 List"
19
19
]
20
20
},
21
21
"config" : " full"
27
27
" -NonInteractive" ,
28
28
" -NoProfile" ,
29
29
" -Command" ,
30
- " $Input | ./powershell.resource.ps1 Get"
30
+ " $Input | ./psDscAdapter/ powershell.resource.ps1 Get"
31
31
],
32
32
"input" : " stdin"
33
33
},
38
38
" -NonInteractive" ,
39
39
" -NoProfile" ,
40
40
" -Command" ,
41
- " $Input | ./powershell.resource.ps1 Set"
41
+ " $Input | ./psDscAdapter/ powershell.resource.ps1 Set"
42
42
],
43
43
"input" : " stdin" ,
44
44
"preTest" : true ,
51
51
" -NonInteractive" ,
52
52
" -NoProfile" ,
53
53
" -Command" ,
54
- " $Input | ./powershell.resource.ps1 Test"
54
+ " $Input | ./psDscAdapter/ powershell.resource.ps1 Test"
55
55
],
56
56
"input" : " stdin" ,
57
57
"return" : " state"
63
63
" -NonInteractive" ,
64
64
" -NoProfile" ,
65
65
" -Command" ,
66
- " $Input | ./powershell.resource.ps1 Validate"
66
+ " $Input | ./psDscAdapter/ powershell.resource.ps1 Validate"
67
67
]
68
68
},
69
69
"exitCodes" : {
You can’t perform that action at this time.
0 commit comments