1--- 2- name: fail with incorrect DSC resource name 3 win_dsc: 4 resource_name: FakeResource 5 register: fail_invalid_resource 6 failed_when: fail_invalid_resource.msg != "Resource 'FakeResource' not found." 7 8- name: fail with invalid DSC version 9 win_dsc: 10 resource_name: xTestResource 11 module_version: 0.0.1 12 register: fail_invalid_version 13 failed_when: 'fail_invalid_version.msg != "Resource ''xTestResource'' with version ''0.0.1'' not found. Versions installed: ''1.0.0'', ''1.0.1''."' 14 15- name: fail with mandatory option not set 16 win_dsc: 17 resource_name: xSetReboot 18 Value: yes 19 register: fail_man_key 20 failed_when: 'fail_man_key.msg != "missing required arguments: KeyParam"' 21 22- name: fail with mandatory option not set in sub dict 23 win_dsc: 24 resource_name: xTestResource 25 Path: C:\path 26 Ensure: Present 27 CimInstanceParam: # Missing KeyValue in dict 28 Choice: Choice1 29 register: fail_man_key_sub_dict 30 failed_when: 'fail_man_key_sub_dict.msg != "missing required arguments: KeyValue found in CimInstanceParam"' 31 32- name: fail invalid option 33 win_dsc: 34 resource_name: xSetReboot 35 KeyParam: key 36 OtherParam: invalid 37 register: fail_invalid_option 38 failed_when: 'fail_invalid_option.msg != "Unsupported parameters for (win_dsc) module: OtherParam. Supported parameters include: KeyParam, PsDscRunAsCredential_username, module_version, Value, PsDscRunAsCredential_password, resource_name, DependsOn"' 39 40- name: fail invalid option in sub dict 41 win_dsc: 42 resource_name: xTestResource 43 Path: C:\path 44 Ensure: Present 45 NestedCimInstanceParam: 46 KeyValue: key 47 CimValue: 48 KeyValue: other key 49 InvalidKey: invalid 50 register: fail_invalid_option_sub_dict 51 failed_when: 'fail_invalid_option_sub_dict.msg != "Unsupported parameters for (win_dsc) module: InvalidKey found in NestedCimInstanceParam -> CimValue. Supported parameters include: IntValue, KeyValue, StringArrayValue, Choice, StringValue"' 52 53- name: fail invalid read only option 54 win_dsc: 55 resource_name: xTestResource 56 Path: C:\path 57 Ensure: Present 58 ReadParam: abc 59 register: fail_invalid_option_read_only 60 failed_when: '"Unsupported parameters for (win_dsc) module: ReadParam" not in fail_invalid_option_read_only.msg' 61 62- name: fail invalid choice 63 win_dsc: 64 resource_name: xTestResource 65 Path: C:\path 66 Ensure: invalid 67 register: fail_invalid_choice 68 failed_when: 'fail_invalid_choice.msg != "value of Ensure must be one of: Present, Absent. Got no match for: invalid"' 69 70- name: fail invalid choice in sub dict 71 win_dsc: 72 resource_name: xTestResource 73 Path: C:\path 74 Ensure: Present 75 CimInstanceArrayParam: 76 - KeyValue: key 77 - KeyValue: key2 78 Choice: Choice3 79 register: fail_invalid_choice_sub_dict 80 failed_when: 'fail_invalid_choice_sub_dict.msg != "value of Choice must be one of: Choice1, Choice2. Got no match for: Choice3 found in CimInstanceArrayParam"' 81 82- name: fail old version missing new option 83 win_dsc: 84 resource_name: xTestResource 85 module_version: 1.0.0 86 Path: C:\path 87 Ensure: Present 88 CimInstanceParam: # CimInstanceParam does not exist in the 1.0.0 version 89 Key: key 90 register: fail_invalid_option_old 91 failed_when: '"Unsupported parameters for (win_dsc) module: CimInstanceParam" not in fail_invalid_option_old.msg' 92 93- name: fail old version missing new option sub dict 94 win_dsc: 95 resource_name: xTestResource 96 module_version: 1.0.0 97 Path: C:\path 98 Ensure: Present 99 CimInstanceArrayParam: 100 - Key: key 101 Choice: Choice1 102 register: fail_invalid_option_old_sub_dict 103 failed_when: 'fail_invalid_option_old_sub_dict.msg != "Unsupported parameters for (win_dsc) module: Choice found in CimInstanceArrayParam. Supported parameters include: Key, IntValue, StringArrayValue, StringValue"' 104 105- name: create test file (check mode) 106 win_dsc: 107 resource_name: File 108 DestinationPath: '{{ remote_tmp_dir }}\dsc-file' 109 Contents: file contents 110 Attributes: 111 - Hidden 112 - ReadOnly 113 Ensure: Present 114 Type: File 115 register: create_file_check 116 check_mode: yes 117 118- name: get result of create test file (check mode) 119 win_stat: 120 path: '{{ remote_tmp_dir }}\dsc-file' 121 register: create_file_actual_check 122 123- name: assert create test file (check mode) 124 assert: 125 that: 126 - create_file_check is changed 127 - create_file_check.module_version == None # Some built in modules don't have a version set 128 - not create_file_check.reboot_required 129 - not create_file_actual_check.stat.exists 130 131- name: assert create test file verbosity (check mode) 132 assert: 133 that: 134 - create_file_check.verbose_test is defined 135 - not create_file_check.verbose_set is defined 136 when: ansible_verbosity >= 3 137 138- name: create test file 139 win_dsc: 140 resource_name: File 141 DestinationPath: '{{ remote_tmp_dir }}\dsc-file' 142 Contents: file contents 143 Attributes: 144 - Hidden 145 - ReadOnly 146 Ensure: Present 147 Type: File 148 register: create_file 149 150- name: get result of create test file 151 win_stat: 152 path: '{{ remote_tmp_dir }}\dsc-file' 153 register: create_file_actual 154 155- name: assert create test file verbosity 156 assert: 157 that: 158 - create_file.verbose_test is defined 159 - create_file.verbose_set is defined 160 when: ansible_verbosity >= 3 161 162- name: assert create test file 163 assert: 164 that: 165 - create_file is changed 166 - create_file.module_version == None 167 - not create_file.reboot_required 168 - create_file_actual.stat.exists 169 - create_file_actual.stat.attributes == "ReadOnly, Hidden, Archive" 170 - create_file_actual.stat.checksum == 'd48daab51112b49ecabd917adc345b8ba257055e' 171 172- name: create test file (idempotent) 173 win_dsc: 174 resource_name: File 175 DestinationPath: '{{ remote_tmp_dir }}\dsc-file' 176 Contents: file contents 177 Attributes: 178 - Hidden 179 - ReadOnly 180 Ensure: Present 181 Type: File 182 register: create_file_again 183 184- name: assert create test file (idempotent) 185 assert: 186 that: 187 - not create_file_again is changed 188 - create_file.module_version == None 189 - not create_file.reboot_required 190 191- name: get SID of the current Ansible user 192 win_shell: | 193 Add-Type -AssemblyName System.DirectoryServices.AccountManagement 194 [System.DirectoryServices.AccountManagement.UserPrincipal]::Current.Sid.Value 195 register: actual_sid 196 197- name: run DSC process as another user 198 win_dsc: 199 resource_name: Script 200 GetScript: '@{ Result= "" }' 201 SetScript: | 202 Add-Type -AssemblyName System.DirectoryServices.AccountManagement 203 $sid = [System.DirectoryServices.AccountManagement.UserPrincipal]::Current.Sid.Value 204 Set-Content -Path "{{ remote_tmp_dir }}\runas.txt" -Value $sid 205 TestScript: $false 206 PsDscRunAsCredential_username: '{{ ansible_user }}' 207 PsDscRunAsCredential_password: '{{ ansible_password }}' 208 register: runas_user 209 210- name: get result of run DSC process as another user 211 slurp: 212 path: '{{ remote_tmp_dir }}\runas.txt' 213 register: runas_user_result 214 215- name: assert run DSC process as another user 216 assert: 217 that: 218 - runas_user is changed 219 - runas_user.module_version != None # Can't reliably set the version but we can test it is set 220 - not runas_user.reboot_required 221 - runas_user_result.content|b64decode == actual_sid.stdout 222 223- name: run DSC that sets reboot_required with defaults 224 win_dsc: 225 resource_name: xSetReboot 226 KeyParam: value # Just to satisfy the Resource with key validation 227 register: set_reboot_defaults 228 229- name: assert run DSC that sets reboot_required with defaults 230 assert: 231 that: 232 - set_reboot_defaults.reboot_required 233 234- name: run DSC that sets reboot_required with False 235 win_dsc: 236 resource_name: xSetReboot 237 KeyParam: value 238 Value: no 239 register: set_reboot_false 240 241- name: assert run DSC that sets reboot_required with False 242 assert: 243 that: 244 - not set_reboot_false.reboot_required 245 246- name: run DSC that sets reboot_required with True 247 win_dsc: 248 resource_name: xSetReboot 249 KeyParam: value 250 Value: yes 251 register: set_reboot_true 252 253- name: assert run DSC that sets reboot_required with True 254 assert: 255 that: 256 - set_reboot_true.reboot_required 257 258- name: test DSC with all types 259 win_dsc: 260 resource_name: xTestResource 261 Path: '{{ remote_tmp_dir }}\test-types.json' 262 Ensure: Present 263 StringParam: string param 264 StringArrayParam: 265 - string 1 266 - string 2 267 Int8Param: 127 # [SByte]::MaxValue 268 Int8ArrayParam: 269 - 127 270 - '127' 271 UInt8Param: 255 # [Byte]::MaxValue 272 UInt8ArrayParam: 273 - 255 274 - '255' 275 Int16Param: 32767 # [Int16]::MaxValue 276 Int16ArrayParam: 32767, 32767 277 UInt16Param: '65535' # [UInt16]::MaxValue 278 UInt16ArrayParam: 65535 279 Int32Param: 2147483647 # [Int32]::MaxValue 280 Int32ArrayParam: '2147483647' 281 UInt32Param: '4294967295' # [UInt32]::MaxValue 282 UInt32ArrayParam: 283 - '4294967295' 284 - 4294967295 285 Int64Param: 9223372036854775807 # [Int64]::MaxValue 286 Int64ArrayParam: 287 - -9223372036854775808 # [Int64]::MinValue 288 - 9223372036854775807 289 UInt64Param: 18446744073709551615 # [UInt64]::MaxValue 290 UInt64ArrayParam: 291 - 0 # [UInt64]::MinValue 292 - 18446744073709551615 293 BooleanParam: True 294 BooleanArrayParam: 295 - True 296 - 'True' 297 - 'true' 298 - 'y' 299 - 'yes' 300 - 1 301 - False 302 - 'False' 303 - 'false' 304 - 'n' 305 - 'no' 306 - 0 307 CharParam: c 308 CharArrayParam: 309 - c 310 - h 311 - a 312 - r 313 SingleParam: 3.402823E+38 314 SingleArrayParam: 315 - '3.402823E+38' 316 - 1.2393494 317 DoubleParam: 1.79769313486232E+300 318 DoubleArrayParam: 319 - '1.79769313486232E+300' 320 - 3.56821831681516 321 DateTimeParam: '2019-02-22T13:57:31.2311892-04:00' 322 DateTimeArrayParam: 323 - '2019-02-22T13:57:31.2311892+00:00' 324 - '2019-02-22T13:57:31.2311892+04:00' 325 PSCredentialParam_username: username1 326 PSCredentialParam_password: password1 327 HashtableParam: 328 key1: string 1 329 key2: '' 330 key3: 1 331 CimInstanceParam: 332 KeyValue: a 333 CimInstanceArrayParam: 334 - KeyValue: b 335 Choice: Choice1 336 StringValue: string 1 337 IntValue: 1 338 StringArrayValue: 339 - abc 340 - def 341 - KeyValue: c 342 Choice: Choice2 343 StringValue: string 2 344 IntValue: '2' 345 StringArrayValue: 346 - ghi 347 - jkl 348 NestedCimInstanceParam: 349 KeyValue: key value 350 CimValue: 351 KeyValue: d 352 CimArrayValue: 353 - KeyValue: e 354 Choice: Choice2 355 HashValue: 356 a: a 357 IntValue: '300' 358 register: dsc_types 359 360- name: get result of test DSC with all types 361 slurp: 362 path: '{{ remote_tmp_dir }}\test-types.json' 363 register: dsc_types_raw 364 365- name: convert result of test DSC with all types to dict 366 set_fact: 367 dsc_types_actual: '{{ dsc_types_raw.content | b64decode | from_json }}' 368 369- name: assert test DSC with all types 370 assert: 371 that: 372 - dsc_types is changed 373 - dsc_types.module_version == '1.0.1' 374 - not dsc_types.reboot_required 375 - dsc_types_actual.Version == '1.0.1' 376 - dsc_types_actual.Verbose.Value.IsPresent 377 - dsc_types_actual.DefaultParam.Value == 'Default' # ensures that the default is set in the engine if we don't set it outselves 378 - dsc_types_actual.Ensure.Value == 'Present' 379 - dsc_types_actual.Path.Value == remote_tmp_dir + "\\test-types.json" 380 - dsc_types_actual.StringParam.Type == 'System.String' 381 - dsc_types_actual.StringParam.Value == 'string param' 382 - dsc_types_actual.StringArrayParam.Type == 'System.String[]' 383 - dsc_types_actual.StringArrayParam.Value == ['string 1', 'string 2'] 384 - dsc_types_actual.Int8Param.Type == 'System.SByte' 385 - dsc_types_actual.Int8Param.Value == 127 386 - dsc_types_actual.Int8ArrayParam.Type == 'System.SByte[]' 387 - dsc_types_actual.Int8ArrayParam.Value == [127, 127] 388 - dsc_types_actual.UInt8Param.Type == 'System.Byte' 389 - dsc_types_actual.UInt8Param.Value == 255 390 - dsc_types_actual.UInt8ArrayParam.Type == 'System.Byte[]' 391 - dsc_types_actual.UInt8ArrayParam.Value == [255, 255] 392 - dsc_types_actual.Int16Param.Type == 'System.Int16' 393 - dsc_types_actual.Int16Param.Value == 32767 394 - dsc_types_actual.Int16ArrayParam.Type == 'System.Int16[]' 395 - dsc_types_actual.Int16ArrayParam.Value == [32767, 32767] 396 - dsc_types_actual.UInt16Param.Type == 'System.UInt16' 397 - dsc_types_actual.UInt16Param.Value == 65535 398 - dsc_types_actual.UInt16ArrayParam.Type == 'System.UInt16[]' 399 - dsc_types_actual.UInt16ArrayParam.Value == [65535] 400 - dsc_types_actual.Int32Param.Type == 'System.Int32' 401 - dsc_types_actual.Int32Param.Value == 2147483647 402 - dsc_types_actual.Int32ArrayParam.Type == 'System.Int32[]' 403 - dsc_types_actual.Int32ArrayParam.Value == [2147483647] 404 - dsc_types_actual.UInt32Param.Type == 'System.UInt32' 405 - dsc_types_actual.UInt32Param.Value == 4294967295 406 - dsc_types_actual.UInt32ArrayParam.Type == 'System.UInt32[]' 407 - dsc_types_actual.UInt32ArrayParam.Value == [4294967295, 4294967295] 408 - dsc_types_actual.Int64Param.Type == 'System.Int64' 409 - dsc_types_actual.Int64Param.Value == 9223372036854775807 410 - dsc_types_actual.Int64ArrayParam.Type == 'System.Int64[]' 411 - dsc_types_actual.Int64ArrayParam.Value == [-9223372036854775808, 9223372036854775807] 412 - dsc_types_actual.UInt64Param.Type == 'System.UInt64' 413 - dsc_types_actual.UInt64Param.Value == 18446744073709551615 414 - dsc_types_actual.UInt64ArrayParam.Type == 'System.UInt64[]' 415 - dsc_types_actual.UInt64ArrayParam.Value == [0, 18446744073709551615] 416 - dsc_types_actual.BooleanParam.Type == 'System.Boolean' 417 - dsc_types_actual.BooleanParam.Value == True 418 - dsc_types_actual.BooleanArrayParam.Type == 'System.Boolean[]' 419 - dsc_types_actual.BooleanArrayParam.Value == [True, True, True, True, True, True, False, False, False, False, False, False] 420 - dsc_types_actual.CharParam.Type == 'System.Char' 421 - dsc_types_actual.CharParam.Value == 'c' 422 - dsc_types_actual.CharArrayParam.Type == 'System.Char[]' 423 - dsc_types_actual.CharArrayParam.Value == ['c', 'h', 'a', 'r'] 424 - dsc_types_actual.SingleParam.Type == 'System.Single' 425 - dsc_types_actual.SingleParam.Value|string == '3.402823e+38' 426 - dsc_types_actual.SingleArrayParam.Type == 'System.Single[]' 427 - dsc_types_actual.SingleArrayParam.Value|length == 2 428 - dsc_types_actual.SingleArrayParam.Value[0]|string == '3.402823e+38' 429 - dsc_types_actual.SingleArrayParam.Value[1]|string == '1.23934937' 430 - dsc_types_actual.DoubleParam.Type == 'System.Double' 431 - dsc_types_actual.DoubleParam.Value == '1.79769313486232E+300' 432 - dsc_types_actual.DoubleArrayParam.Type == 'System.Double[]' 433 - dsc_types_actual.DoubleArrayParam.Value|length == 2 434 - dsc_types_actual.DoubleArrayParam.Value[0] == '1.79769313486232E+300' 435 - dsc_types_actual.DoubleArrayParam.Value[1] == '3.56821831681516' 436 - dsc_types_actual.DateTimeParam.Type == 'System.DateTime' 437 - dsc_types_actual.DateTimeParam.Value == '2019-02-22T17:57:31.2311890+00:00' 438 - dsc_types_actual.DateTimeArrayParam.Type == 'System.DateTime[]' 439 - dsc_types_actual.DateTimeArrayParam.Value == ['2019-02-22T13:57:31.2311890+00:00', '2019-02-22T09:57:31.2311890+00:00'] 440 - dsc_types_actual.PSCredentialParam.Type == 'System.Management.Automation.PSCredential' 441 - dsc_types_actual.PSCredentialParam.Value.username == 'username1' 442 - dsc_types_actual.PSCredentialParam.Value.password == 'password1' 443 # Hashtable is actually a CimInstance[] of MSFT_KeyValuePairs 444 - dsc_types_actual.HashtableParam.Type == 'Microsoft.Management.Infrastructure.CimInstance[]' 445 - dsc_types_actual.HashtableParam.Value|length == 3 446 # Can't guarantee the order of the keys so just check they are the values they could be 447 - dsc_types_actual.HashtableParam.Value[0].Key in ["key1", "key2", "key3"] 448 - dsc_types_actual.HashtableParam.Value[0].Value in ["string 1", "1", ""] 449 - dsc_types_actual.HashtableParam.Value[0]._cim_instance == 'MSFT_KeyValuePair' 450 - dsc_types_actual.HashtableParam.Value[1].Key in ["key1", "key2", "key3"] 451 - dsc_types_actual.HashtableParam.Value[1].Value in ["string 1", "1", ""] 452 - dsc_types_actual.HashtableParam.Value[1]._cim_instance == 'MSFT_KeyValuePair' 453 - dsc_types_actual.HashtableParam.Value[2].Key in ["key1", "key2", "key3"] 454 - dsc_types_actual.HashtableParam.Value[2].Value in ["string 1", "1", ""] 455 - dsc_types_actual.HashtableParam.Value[2]._cim_instance == 'MSFT_KeyValuePair' 456 - dsc_types_actual.CimInstanceParam.Type == 'Microsoft.Management.Infrastructure.CimInstance' 457 - dsc_types_actual.CimInstanceParam.Value.Choice == None 458 - dsc_types_actual.CimInstanceParam.Value.IntValue == None 459 - dsc_types_actual.CimInstanceParam.Value.KeyValue == 'a' 460 - dsc_types_actual.CimInstanceParam.Value.StringArrayValue == None 461 - dsc_types_actual.CimInstanceParam.Value.StringValue == None 462 - dsc_types_actual.CimInstanceParam.Value._cim_instance == "ANSIBLE_xTestClass" 463 - dsc_types_actual.CimInstanceArrayParam.Type == 'Microsoft.Management.Infrastructure.CimInstance[]' 464 - dsc_types_actual.CimInstanceArrayParam.Value|length == 2 465 - dsc_types_actual.CimInstanceArrayParam.Value[0].Choice == 'Choice1' 466 - dsc_types_actual.CimInstanceArrayParam.Value[0].IntValue == 1 467 - dsc_types_actual.CimInstanceArrayParam.Value[0].KeyValue == 'b' 468 - dsc_types_actual.CimInstanceArrayParam.Value[0].StringArrayValue == ['abc', 'def'] 469 - dsc_types_actual.CimInstanceArrayParam.Value[0].StringValue == 'string 1' 470 - dsc_types_actual.CimInstanceArrayParam.Value[0]._cim_instance == 'ANSIBLE_xTestClass' 471 - dsc_types_actual.CimInstanceArrayParam.Value[1].Choice == 'Choice2' 472 - dsc_types_actual.CimInstanceArrayParam.Value[1].IntValue == 2 473 - dsc_types_actual.CimInstanceArrayParam.Value[1].KeyValue == 'c' 474 - dsc_types_actual.CimInstanceArrayParam.Value[1].StringArrayValue == ['ghi', 'jkl'] 475 - dsc_types_actual.CimInstanceArrayParam.Value[1].StringValue == 'string 2' 476 - dsc_types_actual.CimInstanceArrayParam.Value[1]._cim_instance == 'ANSIBLE_xTestClass' 477 - dsc_types_actual.NestedCimInstanceParam.Type == 'Microsoft.Management.Infrastructure.CimInstance' 478 - dsc_types_actual.NestedCimInstanceParam.Value.CimArrayValue|length == 1 479 - dsc_types_actual.NestedCimInstanceParam.Value.CimArrayValue[0].Choice == 'Choice2' 480 - dsc_types_actual.NestedCimInstanceParam.Value.CimArrayValue[0].IntValue == None 481 - dsc_types_actual.NestedCimInstanceParam.Value.CimArrayValue[0].KeyValue == 'e' 482 - dsc_types_actual.NestedCimInstanceParam.Value.CimArrayValue[0].StringArrayValue == None 483 - dsc_types_actual.NestedCimInstanceParam.Value.CimArrayValue[0].StringValue == None 484 - dsc_types_actual.NestedCimInstanceParam.Value.CimArrayValue[0]._cim_instance == 'ANSIBLE_xTestClass' 485 - dsc_types_actual.NestedCimInstanceParam.Value.CimValue.Choice == None 486 - dsc_types_actual.NestedCimInstanceParam.Value.CimValue.IntValue == None 487 - dsc_types_actual.NestedCimInstanceParam.Value.CimValue.KeyValue == 'd' 488 - dsc_types_actual.NestedCimInstanceParam.Value.CimValue.StringArrayValue == None 489 - dsc_types_actual.NestedCimInstanceParam.Value.CimValue.StringValue == None 490 - dsc_types_actual.NestedCimInstanceParam.Value.CimValue._cim_instance == 'ANSIBLE_xTestClass' 491 - dsc_types_actual.NestedCimInstanceParam.Value.HashValue|length == 1 492 - dsc_types_actual.NestedCimInstanceParam.Value.HashValue[0].Key == 'a' 493 - dsc_types_actual.NestedCimInstanceParam.Value.HashValue[0].Value == 'a' 494 - dsc_types_actual.NestedCimInstanceParam.Value.HashValue[0]._cim_instance == 'MSFT_KeyValuePair' 495 - dsc_types_actual.NestedCimInstanceParam.Value.IntValue == 300 496 - dsc_types_actual.NestedCimInstanceParam.Value.KeyValue == 'key value' 497 - dsc_types_actual.NestedCimInstanceParam.Value._cim_instance == 'ANSIBLE_xNestedClass' 498 499- name: test DSC with all types older version 500 win_dsc: 501 resource_name: xTestResource 502 module_version: 1.0.0 503 Path: '{{ remote_tmp_dir }}\test-types.json' 504 Ensure: Absent 505 StringParam: string param old 506 CimInstanceArrayParam: 507 - Key: old key 508 StringValue: string old 1 509 IntValue: 0 510 StringArrayValue: 511 - zyx 512 - wvu 513 register: dsc_types_old 514 515- name: get result of test DSC with all types older version 516 slurp: 517 path: '{{ remote_tmp_dir }}\test-types.json' 518 register: dsc_types_old_raw 519 520- name: convert result of test DSC with all types to dict 521 set_fact: 522 dsc_types_old_actual: '{{ dsc_types_old_raw.content | b64decode | from_json }}' 523 524- name: assert test DSC with all types older version 525 assert: 526 that: 527 - dsc_types_old is changed 528 - dsc_types_old.module_version == '1.0.0' 529 - not dsc_types_old.reboot_required 530 - dsc_types_old_actual.Version == '1.0.0' 531 - dsc_types_old_actual.Verbose.Value.IsPresent 532 - dsc_types_old_actual.DefaultParam.Value == 'Default' 533 - dsc_types_old_actual.Ensure.Value == 'Absent' 534 - dsc_types_old_actual.Path.Value == remote_tmp_dir + "\\test-types.json" 535 - dsc_types_old_actual.StringParam.Type == 'System.String' 536 - dsc_types_old_actual.StringParam.Value == 'string param old' 537 - dsc_types_old_actual.CimInstanceArrayParam.Type == 'Microsoft.Management.Infrastructure.CimInstance[]' 538 - dsc_types_old_actual.CimInstanceArrayParam.Value|length == 1 539 - not dsc_types_old_actual.CimInstanceArrayParam.Value[0].Choice is defined # 1.0.0 does not have a Choice option 540 - dsc_types_old_actual.CimInstanceArrayParam.Value[0].IntValue == 0 541 - dsc_types_old_actual.CimInstanceArrayParam.Value[0].Key == 'old key' 542 - dsc_types_old_actual.CimInstanceArrayParam.Value[0].StringArrayValue == ['zyx', 'wvu'] 543 - dsc_types_old_actual.CimInstanceArrayParam.Value[0].StringValue == 'string old 1' 544 - dsc_types_old_actual.CimInstanceArrayParam.Value[0]._cim_instance == 'ANSIBLE_xTestClass' 545