Test-AdfLinkedService return an object
When you specify an array of linkedServices it would be nice to receive an object (eg hash-table) over the result (passed/failed/total).
It could be implemented as follows:
`function Test-AdfLinkedService { : : Write-Host "Test connection result:" Write-Host "Passed: $ok" Write-Host "Failed: $($all-$ok)" Write-Host "Total : $all"
$result = [ordered]@{Passed = $ok; Failed = ($all-$ok); Total = $all} return $result }`
Thanks, that's a good idea. In addition to that, would be good to:
- return list (hash table) of tested objects with their result
- add unit test of this method
I just finished #151 and used updated Test-AdfLinkedService CmdLet in the automated test process and I have a couple of questions about this.
- Should Cmdlet print anything by default if not using -Debug and/or -Verbose flags?
- I had to use 6> /dev/null to to ignore Write-Info level because I wanted to print single "." after every Test-AdfLinkedService invocation
I will create something (without unit tests) on top of #151 quickly because this is something I needed yesterday. PR coming later.
Yes, please. I believe every test should be logged separately as it does help with troubleshooting significantly.