-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathdsc_group.tests.ps1
More file actions
96 lines (94 loc) · 2 KB
/
dsc_group.tests.ps1
File metadata and controls
96 lines (94 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
Describe 'Group resource tests' {
It 'Nested groups should work for get' {
$out = (dsc config get -f $PSScriptRoot/../examples/groups.dsc.yaml -o yaml | Out-String).Trim()
$LASTEXITCODE | Should -Be 0
$out | Should -BeLike @'
executionInformation:
duration: PT*S
endDatetime: *
executionType: actual
operation: get
securityContext: *
startDatetime: *
version: 3*
metadata:
Microsoft.DSC:
duration: PT*S
endDatetime: *
executionType: Actual
operation: Get
securityContext: *
startDatetime: *
version: 3*
results:
- executionInformation:
duration: *
metadata:
Microsoft.DSC:
duration: *
name: First Group
type: Microsoft.DSC/Group
result:
- executionInformation:
duration: *
metadata:
Microsoft.DSC:
duration: *
name: First
type: Microsoft.DSC.Debug/Echo
result:
actualState:
output: First
- executionInformation:
duration: *
metadata:
Microsoft.DSC:
duration: *
name: Nested Group
type: Microsoft.DSC/Group
result:
- executionInformation:
duration: *
metadata:
Microsoft.DSC:
duration: *
name: Nested First
type: Microsoft.DSC.Debug/Echo
result:
actualState:
output: Nested First
- executionInformation:
duration: *
metadata:
Microsoft.DSC:
duration: *
name: Nested Second
type: Microsoft.DSC.Debug/Echo
result:
actualState:
output: Nested Second
- executionInformation:
duration: *
metadata:
Microsoft.DSC:
duration: *
name: Last Group
type: Microsoft.DSC/Group
result:
- executionInformation:
duration: *
metadata:
Microsoft.DSC:
duration: *
name: Last
type: Microsoft.DSC.Debug/Echo
result:
actualState:
output: Last
messages: `[`]
hadErrors: false
'@ -Because $out
}
}