|
42 | 42 | HERE |
43 | 43 |
|
44 | 44 | result = formatter.format('ensure' => 'Present', |
45 | | - 'name' => 'foo', |
46 | | - 'state' => 'Started', |
47 | | - 'physicalpath' => 'c:/inetpub/wwwroot', |
| 45 | + 'name' => 'foo', |
| 46 | + 'state' => 'Started', |
| 47 | + 'physicalpath' => 'c:/inetpub/wwwroot', |
48 | 48 | 'bindinginfo' => { |
49 | | - 'dsc_type' => 'MSFT_xWebBindingInformation[]', |
| 49 | + 'dsc_type' => 'MSFT_xWebBindingInformation[]', |
50 | 50 | 'dsc_properties' => { |
51 | 51 | 'protocol' => 'HTTP', |
52 | 52 | 'port' => 80 |
|
73 | 73 | HERE |
74 | 74 |
|
75 | 75 | result = formatter.format('ensure' => 'Present', |
76 | | - 'name' => 'foo', |
77 | | - 'state' => 'Started', |
78 | | - 'physicalpath' => 'c:/inetpub/wwwroot', |
| 76 | + 'name' => 'foo', |
| 77 | + 'state' => 'Started', |
| 78 | + 'physicalpath' => 'c:/inetpub/wwwroot', |
79 | 79 | 'authenticationinfo' => { |
80 | | - 'dsc_type' => 'MSFT_xWebAuthenticationInformation', |
| 80 | + 'dsc_type' => 'MSFT_xWebAuthenticationInformation', |
81 | 81 | 'dsc_properties' => { |
82 | 82 | 'anonymous' => true, |
83 | 83 | 'basic' => false, |
|
113 | 113 | HERE |
114 | 114 |
|
115 | 115 | result = formatter.format('ensure' => 'Present', |
116 | | - 'name' => 'foo', |
117 | | - 'state' => 'Started', |
| 116 | + 'name' => 'foo', |
| 117 | + 'state' => 'Started', |
118 | 118 | 'physicalpath' => 'c:/inetpub/wwwroot', |
119 | | - 'bindinginfo' => { |
120 | | - 'dsc_type' => 'MSFT_xWebBindingInformation[]', |
| 119 | + 'bindinginfo' => { |
| 120 | + 'dsc_type' => 'MSFT_xWebBindingInformation[]', |
121 | 121 | 'dsc_properties' => [ |
122 | 122 | { |
123 | 123 | 'protocol' => 'HTTP', |
124 | | - 'port' => 80 |
| 124 | + 'port' => 80 |
125 | 125 | }, |
126 | 126 | { |
127 | | - 'protocol' => 'HTTPS', |
128 | | - 'port' => 443, |
| 127 | + 'protocol' => 'HTTPS', |
| 128 | + 'port' => 443, |
129 | 129 | 'certificatethumbprint' => '5438DC0CB31B1C91B8945C7D91B3338F9C08BEFA', |
130 | | - 'certificatestorename' => 'My', |
| 130 | + 'certificatestorename' => 'My', |
131 | 131 | 'ipaddress' => '*' |
132 | 132 | }, |
133 | 133 | ] |
|
152 | 152 | HERE |
153 | 153 | result = formatter.format('username' => 'jane-doe', |
154 | 154 | 'description' => 'Jane Doe user', |
155 | | - 'ensure' => 'present', |
156 | | - 'password' => { |
| 155 | + 'ensure' => 'present', |
| 156 | + 'password' => { |
157 | 157 | 'dsc_type' => 'MSFT_Credential', |
158 | 158 | 'dsc_properties' => { |
159 | | - 'user' => 'jane-doe', |
| 159 | + 'user' => 'jane-doe', |
160 | 160 | 'password' => 'jane-password' |
161 | 161 | } |
162 | 162 | }, |
163 | 163 | 'passwordneverexpires' => false, |
164 | | - 'disabled' => true) |
| 164 | + 'disabled' => true) |
165 | 165 | expect(result).to eq expected.strip |
166 | 166 | end |
167 | 167 |
|
|
177 | 177 | } |
178 | 178 | HERE |
179 | 179 | result = formatter.format('destinationPath' => "c:\fileName.jpg", |
180 | | - 'uri' => 'http://www.contoso.com/image.jpg', |
181 | | - 'userAgent' => '[Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer', |
182 | | - 'headers' => { |
| 180 | + 'uri' => 'http://www.contoso.com/image.jpg', |
| 181 | + 'userAgent' => '[Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer', |
| 182 | + 'headers' => { |
183 | 183 | 'Accept-Language' => 'en-US' |
184 | 184 | }) |
185 | 185 | expect(result).to eq expected.strip |
|
202 | 202 | sensitive_pass = Puppet::Pops::Types::PSensitiveType::Sensitive.new('password') |
203 | 203 | result = formatter.format('username' => 'jane-doe', |
204 | 204 | 'description' => 'Jane Doe user', |
205 | | - 'ensure' => 'present', |
206 | | - 'password' => { |
| 205 | + 'ensure' => 'present', |
| 206 | + 'password' => { |
207 | 207 | 'dsc_type' => 'MSFT_Credential', |
208 | 208 | 'dsc_properties' => { |
209 | | - 'user' => 'jane-doe', |
| 209 | + 'user' => 'jane-doe', |
210 | 210 | 'password' => sensitive_pass |
211 | 211 | } |
212 | 212 | }, |
213 | 213 | 'passwordneverexpires' => false, |
214 | | - 'disabled' => true) |
| 214 | + 'disabled' => true) |
215 | 215 | expect(result).to eq expected.strip |
216 | 216 | end |
217 | 217 | end |
|
0 commit comments