dsccommunity / AzureDevOpsDsc

This module contains DSC resources for deployment and configuration of initially Azure DevOps Services and later Azure DevOps Server.
MIT License
1 stars 5 forks source link

AzDevOpsProject: Integration tests fail with non-terminating error #18

Closed johlju closed 3 years ago

johlju commented 3 years ago

When running the integration tests some tests fail with non-terminating error make Pester think the test passed thus not failing the pipeline.

https://dev.azure.com/dsccommunity/AzureDevOpsDsc/_build/results?buildId=3711&view=logs&j=893fd6d3-ee14-5383-e15d-24a2acc7f145&t=417fa350-1299-5d83-5f55-4c06f3da5c2a

2021-01-24T15:54:02.3427824Z     Context When compiling, applying and testing the MOF - 'AzDevOpsProject_UpdateGitProjectToTfvc_Config'
2021-01-24T15:54:02.5475778Z VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = 
2021-01-24T15:54:02.5476712Z SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = 
2021-01-24T15:54:02.5477144Z root/Microsoft/Windows/DesiredStateConfiguration'.
2021-01-24T15:54:02.5679504Z VERBOSE: An LCM method call arrived from computer WIN-2TKBNCAMUG8 with user sid 
2021-01-24T15:54:02.5680611Z S-1-5-21-821657283-2850604343-1343404145-500.
2021-01-24T15:54:02.5709270Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Set      ]
2021-01-24T15:54:02.7453312Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Resource ]  [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc]
2021-01-24T15:54:02.7481098Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Test     ]  [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc]
2021-01-24T15:54:02.7509779Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] GET 
2021-01-24T15:54:02.7516838Z https://dev.azure.com/azuredevopsdsc/_apis/projects?includeCapabilities=true&api-version=6.0 with 0-byte payload
2021-01-24T15:54:02.8350266Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] 
2021-01-24T15:54:02.8358484Z received 335-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:02.8476588Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] GET 
2021-01-24T15:54:02.8477717Z https://dev.azure.com/azuredevopsdsc/_apis/projects/ac5726f2-986d-4620-a0c6-a12def11d0f5?includeCapabilities=true&api-v
2021-01-24T15:54:02.8478808Z ersion=6.0 with 0-byte payload
2021-01-24T15:54:03.0207126Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] 
2021-01-24T15:54:03.0210574Z received 1063-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:03.1405876Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Test     ]  [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc]  in 
2021-01-24T15:54:03.1407290Z 0.4930 seconds.
2021-01-24T15:54:03.1925766Z       [+] Should throw when compiling MOF and when calling "Start-DscConfiguration" 772ms
2021-01-24T15:54:03.2131529Z VERBOSE: An LCM method call arrived from computer WIN-2TKBNCAMUG8 with user sid 
2021-01-24T15:54:03.2142177Z S-1-5-21-821657283-2850604343-1343404145-500.
2021-01-24T15:54:03.2195697Z WARNING: [WIN-2TKBNCAMUG8]:                            [] The GET operation will be carried against a pending 
2021-01-24T15:54:03.2199013Z configuration since the latest configuration has not converged yet.
2021-01-24T15:54:03.2722706Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Get      ]      
2021-01-24T15:54:03.3128000Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] GET 
2021-01-24T15:54:03.3196657Z https://dev.azure.com/azuredevopsdsc/_apis/projects?includeCapabilities=true&api-version=6.0 with 0-byte payload
2021-01-24T15:54:03.4783647Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] 
2021-01-24T15:54:03.4788433Z received 335-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:03.4938541Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] GET 
2021-01-24T15:54:03.4940124Z https://dev.azure.com/azuredevopsdsc/_apis/projects/ac5726f2-986d-4620-a0c6-a12def11d0f5?includeCapabilities=true&api-v
2021-01-24T15:54:03.4940693Z ersion=6.0 with 0-byte payload
2021-01-24T15:54:03.6668805Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] 
2021-01-24T15:54:03.6669933Z received 1063-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:03.6879721Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Get      ]  [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc]  in 
2021-01-24T15:54:03.6883889Z 0.4130 seconds.
2021-01-24T15:54:03.6985610Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Get      ]    in  0.4770 seconds.
2021-01-24T15:54:03.8366719Z       [+] Should not throw when calling "Get-DscConfiguration" 632ms
2021-01-24T15:54:03.8542605Z VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = TestConfiguration,'className' 
2021-01-24T15:54:03.8546622Z = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
2021-01-24T15:54:03.8662732Z VERBOSE: An LCM method call arrived from computer WIN-2TKBNCAMUG8 with user sid 
2021-01-24T15:54:03.8684405Z S-1-5-21-821657283-2850604343-1343404145-500.
2021-01-24T15:54:03.8877082Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Test     ]
2021-01-24T15:54:03.8960238Z WARNING: [WIN-2TKBNCAMUG8]:                            [] The TEST operation will be carried against a pending 
2021-01-24T15:54:03.8960985Z configuration since the latest configuration has not converged yet.
2021-01-24T15:54:03.9726162Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Resource ]  [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc]
2021-01-24T15:54:03.9734561Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Test     ]  [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc]
2021-01-24T15:54:03.9885996Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] GET 
2021-01-24T15:54:03.9889458Z https://dev.azure.com/azuredevopsdsc/_apis/projects?includeCapabilities=true&api-version=6.0 with 0-byte payload
2021-01-24T15:54:04.1641816Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] 
2021-01-24T15:54:04.1662069Z received 335-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:04.1811451Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] GET 
2021-01-24T15:54:04.1821813Z https://dev.azure.com/azuredevopsdsc/_apis/projects/ac5726f2-986d-4620-a0c6-a12def11d0f5?includeCapabilities=true&api-v
2021-01-24T15:54:04.1824224Z ersion=6.0 with 0-byte payload
2021-01-24T15:54:04.3584489Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] 
2021-01-24T15:54:04.3588878Z received 1063-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:04.3770317Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Test     ]  [[AzDevOpsProject]Integration_Test_UpdateGitProjectToTfvc] False
2021-01-24T15:54:04.3771165Z  in 0.4340 seconds.
2021-01-24T15:54:04.3802874Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ *FAILED*Test     ]     Completed processing test operation. The operation failed.
2021-01-24T15:54:04.4550439Z PowerShell DSC resource AzureDevOpsDsc  failed to execute Test functionality with error message: The 
2021-01-24T15:54:04.4551731Z 'AzDevOpsProject', DSC Resource does not support changes for/to the 'SourceControlType' property. 
2021-01-24T15:54:04.4552572Z     + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
2021-01-24T15:54:04.4553357Z     + FullyQualifiedErrorId : ProviderOperationExecutionFailure
2021-01-24T15:54:04.4553976Z     + PSComputerName        : localhost
2021-01-24T15:54:04.4554403Z  
2021-01-24T15:54:04.4578047Z VERBOSE: Operation 'Invoke CimMethod' complete.
2021-01-24T15:54:04.4612502Z VERBOSE: Time taken for configuration job to complete is 0.618 seconds
2021-01-24T15:54:04.4788079Z       [+] Should return $false or $null when Test-DscConfiguration is run 631ms
2021-01-24T15:54:04.5231743Z 
2021-01-24T15:54:04.5295119Z     Context When compiling, applying and testing the MOF - 'AzDevOpsProject_EnsureGitProjectAbsent2_Config'
2021-01-24T15:54:04.7437615Z VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = 
2021-01-24T15:54:04.7438499Z SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = 
2021-01-24T15:54:04.7439412Z root/Microsoft/Windows/DesiredStateConfiguration'.
2021-01-24T15:54:04.7771469Z VERBOSE: An LCM method call arrived from computer WIN-2TKBNCAMUG8 with user sid 
2021-01-24T15:54:04.7772353Z S-1-5-21-821657283-2850604343-1343404145-500.
2021-01-24T15:54:04.7789761Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Set      ]
2021-01-24T15:54:04.8675784Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Resource ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2]
2021-01-24T15:54:04.8680983Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Test     ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2]
2021-01-24T15:54:04.8807619Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] GET 
2021-01-24T15:54:04.8809176Z https://dev.azure.com/azuredevopsdsc/_apis/projects?includeCapabilities=true&api-version=6.0 with 0-byte payload
2021-01-24T15:54:05.0515013Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:05.0516081Z received 335-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:05.0617901Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] GET 
2021-01-24T15:54:05.0618837Z https://dev.azure.com/azuredevopsdsc/_apis/projects/ac5726f2-986d-4620-a0c6-a12def11d0f5?includeCapabilities=true&api-v
2021-01-24T15:54:05.0619244Z ersion=6.0 with 0-byte payload
2021-01-24T15:54:05.2297387Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:05.2302872Z received 1063-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:05.2333144Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:05.2334023Z DscActionRequired='Remove'
2021-01-24T15:54:05.2358817Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Test     ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2]  in 
2021-01-24T15:54:05.2360124Z 0.3870 seconds.
2021-01-24T15:54:05.2384178Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Set      ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2]
2021-01-24T15:54:05.2629682Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] GET 
2021-01-24T15:54:05.2633036Z https://dev.azure.com/azuredevopsdsc/_apis/projects?includeCapabilities=true&api-version=6.0 with 0-byte payload
2021-01-24T15:54:05.4284843Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:05.4334180Z received 335-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:05.4459894Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] GET 
2021-01-24T15:54:05.4461000Z https://dev.azure.com/azuredevopsdsc/_apis/projects/ac5726f2-986d-4620-a0c6-a12def11d0f5?includeCapabilities=true&api-v
2021-01-24T15:54:05.4462966Z ersion=6.0 with 0-byte payload
2021-01-24T15:54:05.6185839Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:05.6200484Z received 1063-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:05.6262563Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:05.6263892Z DscActionRequired='Remove'
2021-01-24T15:54:05.6374924Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] GET 
2021-01-24T15:54:05.6407179Z https://dev.azure.com/azuredevopsdsc/_apis/projects?includeCapabilities=true&api-version=6.0 with 0-byte payload
2021-01-24T15:54:05.8046859Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:05.8049041Z received 335-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:05.8841569Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] GET 
2021-01-24T15:54:05.8843327Z https://dev.azure.com/azuredevopsdsc/_apis/projects/ac5726f2-986d-4620-a0c6-a12def11d0f5?includeCapabilities=true&api-v
2021-01-24T15:54:05.8844577Z ersion=6.0 with 0-byte payload
2021-01-24T15:54:06.0076840Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:06.0080424Z received 1063-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:06.0477806Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:06.0478670Z DELETE 
2021-01-24T15:54:06.0480203Z https://dev.azure.com/azuredevopsdsc/_apis/projects/ac5726f2-986d-4620-a0c6-a12def11d0f5?includeCapabilities=true&api-v
2021-01-24T15:54:06.0481567Z ersion=6.0 with 0-byte payload
2021-01-24T15:54:06.2952138Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:06.2961955Z received 162-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:06.3247745Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] GET 
2021-01-24T15:54:06.3248868Z https://dev.azure.com/azuredevopsdsc/_apis/operations/8a7a72c3-4cd2-44cc-b4cd-2fec3e1edffa?includeCapabilities=true&api
2021-01-24T15:54:06.3249611Z -version=6.0 with 0-byte payload
2021-01-24T15:54:06.4946185Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:06.4949243Z received 286-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:07.0052828Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] GET 
2021-01-24T15:54:07.0053845Z https://dev.azure.com/azuredevopsdsc/_apis/operations/8a7a72c3-4cd2-44cc-b4cd-2fec3e1edffa?includeCapabilities=true&api
2021-01-24T15:54:07.0054479Z -version=6.0 with 0-byte payload
2021-01-24T15:54:07.1792303Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:07.1799377Z received 285-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:09.6821590Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Set      ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2]  in 
2021-01-24T15:54:09.6840413Z 4.4430 seconds.
2021-01-24T15:54:09.6875984Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Resource ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2]
2021-01-24T15:54:09.6876924Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Set      ]
2021-01-24T15:54:09.6897563Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Set      ]    in  4.9070 seconds.
2021-01-24T15:54:09.6905093Z VERBOSE: Operation 'Invoke CimMethod' complete.
2021-01-24T15:54:09.6975221Z VERBOSE: Time taken for configuration job to complete is 4.957 seconds
2021-01-24T15:54:09.7154046Z       [+] Should not throw when compiling MOF and when calling "Start-DscConfiguration" 5.13s
2021-01-24T15:54:09.7394183Z VERBOSE: An LCM method call arrived from computer WIN-2TKBNCAMUG8 with user sid 
2021-01-24T15:54:09.7400065Z S-1-5-21-821657283-2850604343-1343404145-500.
2021-01-24T15:54:09.8271051Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Get      ]      
2021-01-24T15:54:09.8559346Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] GET 
2021-01-24T15:54:09.8561886Z https://dev.azure.com/azuredevopsdsc/_apis/projects?includeCapabilities=true&api-version=6.0 with 0-byte payload
2021-01-24T15:54:10.0164356Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:10.0200387Z received 22-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:10.0371164Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Get      ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2]  in 
2021-01-24T15:54:10.0374708Z 0.2100 seconds.
2021-01-24T15:54:10.0413620Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Get      ]    in  0.2950 seconds.
2021-01-24T15:54:10.1806504Z       [+] Should not throw when calling "Get-DscConfiguration" 453ms
2021-01-24T15:54:10.1938636Z       [+] Should have set the resource and all the parameters should match 4ms
2021-01-24T15:54:10.2089313Z VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = TestConfiguration,'className' 
2021-01-24T15:54:10.2094430Z = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
2021-01-24T15:54:10.2184101Z VERBOSE: An LCM method call arrived from computer WIN-2TKBNCAMUG8 with user sid 
2021-01-24T15:54:10.2184976Z S-1-5-21-821657283-2850604343-1343404145-500.
2021-01-24T15:54:10.2246148Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Test     ]
2021-01-24T15:54:10.4050438Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Resource ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2]
2021-01-24T15:54:10.4100727Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ Start  Test     ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2]
2021-01-24T15:54:10.4139478Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] GET 
2021-01-24T15:54:10.4144969Z https://dev.azure.com/azuredevopsdsc/_apis/projects?includeCapabilities=true&api-version=6.0 with 0-byte payload
2021-01-24T15:54:10.5004860Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:10.5010762Z received 22-byte response of content type application/json; charset=utf-8; api-version=6.0
2021-01-24T15:54:10.5087438Z VERBOSE: [WIN-2TKBNCAMUG8]:                            [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] 
2021-01-24T15:54:10.5088914Z DscActionRequired='None'
2021-01-24T15:54:10.5131606Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Test     ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2] True
2021-01-24T15:54:10.5137538Z  in 0.2030 seconds.
2021-01-24T15:54:10.5160143Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Resource ]  [[AzDevOpsProject]Integration_Test_EnsureGitProjectAbsent2]
2021-01-24T15:54:10.5196068Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Test     ]     Completed processing test operation. The operation returned 
2021-01-24T15:54:10.5204425Z True.
2021-01-24T15:54:10.5268802Z VERBOSE: [WIN-2TKBNCAMUG8]: LCM:  [ End    Test     ]    in  0.2920 seconds.
2021-01-24T15:54:10.5341319Z VERBOSE: Operation 'Invoke CimMethod' complete.
2021-01-24T15:54:10.5380028Z VERBOSE: Time taken for configuration job to complete is 0.337 seconds
2021-01-24T15:54:10.5575501Z       [+] Should return $true when Test-DscConfiguration is run 345ms
johlju commented 3 years ago

@SphenicPaul do you know that is going on here? 🤔

johlju commented 3 years ago

I have a branch here that enable the integration tests https://github.com/dsccommunity/AzureDevOpsDsc/tree/f/enable-integration-tests. Will merge into main once the integration tests does not fail.

SphenicPaul commented 3 years ago

@johlju - There are a few resources that do not have any Azure DevOps API support for updating the resource in particular ways (e.g. updating a Project resource from using Git to Tfvc as the SourceControlType) however, the properties are still needed for initial creation of the resource so still need to be properties on the resource (but these wouldn't likely change post-creation).

The error/exception is thrown if the specific operation is invalid - e.g. The 'AzDevOpsProject', DSC Resource does not support changes for/to the 'SourceControlType' property. shown in DSC output you highlighted.

I'm not clear why it's not being trapped/caught at present, but I was pondering (during development) about making use of New-InvalidOperationException (from DscResource.Common) and the localization items/strings in a similar way to the SqlServerDsc module uses these ... this would provide consistency across modules and might output this slightly differently.

I'll try and take a look at this although it might be later in the week or next weekend - I need to trace through the code execution path again as there are a few base and inherited classes and functions. I'm not initially sure why the Get-DscConfiguration would run through the GetDscRequiredAction() function in the AzDevOpsDscResourceBase, base class that throws the exception that's failing to be caught. ... why it's not being caught is another question I'd hope to answer first.

johlju commented 3 years ago

Using New-InvalidOperationException souldrottningen be great, those functions are meant to be used for resources in several modules. It should catch an error if the resource throws an error. In this case maybe there is a cmdlet that needs -ErrorAction ’Stop’ for it to throw an exception (default might be Continue).

SphenicPaul commented 3 years ago

@johlju - I got to the bottom of this and should be resolved with PR #20.

I've run the integration tests in my own area/organization and these have run through without the same non-terminating error as before. Not sure if you want to merge this into main and confirm that it now runs/looks OK. I'll add another issue for use of the localization strings (which ties into #19 a little also).

It's probably worth focusing on #9 next (getting integration build into the pipeline) as these PRs will become a little convoluted/difficult switching the build config in and out when contributing.