Repository navigation
Test fixes and code coverage automation fixes. - #5046
Conversation
There was a problem hiding this comment.
This is almost exactly the same as above, perhaps a helper function instead?
There was a problem hiding this comment.
Fixed.
There was a problem hiding this comment.
Since you're modifying this, might as well fix the casing Remove-Item
There was a problem hiding this comment.
And casing parameters too.
There was a problem hiding this comment.
Fixed.
There was a problem hiding this comment.
Search replace out-file with Out-File
There was a problem hiding this comment.
And casing parameters too.
There was a problem hiding this comment.
Fixed.
Ilya (iSazonov)
left a comment
There was a problem hiding this comment.
Leave a comment
There was a problem hiding this comment.
Maybe Should BeGreaterThan 0 - else next line can throw with useless message.
There was a problem hiding this comment.
Ilya (@iSazonov) Can you elaborate. I want to check it for being exactly 1. If the check fails, the next line will not be executed and the It will be marked as 'Failed'.
There was a problem hiding this comment.
If $res.CompletionMatches.Count = 0 then $res.CompletionMatches[0] will throw with generic message.
There was a problem hiding this comment.
But if $res.CompletionMatches.Count = 2 and we are using Should BeGreaterThan 0 then the test might pass but we are getting more matches than expected.
There was a problem hiding this comment.
I wonder now - why are we removing this line with Should BeExactly 1 if we want just 1 ?
There was a problem hiding this comment.
Correct, I confused this with the about_help test. This can be BeGreaterThan 0.
There was a problem hiding this comment.
Fixed.
There was a problem hiding this comment.
Maybe Should BeGreaterThan 0 - else next line can throw with useless message.
There was a problem hiding this comment.
Correct, I confused this with the about_help test. This can be BeGreaterThan 0.
There was a problem hiding this comment.
Fixed.
There was a problem hiding this comment.
The same - maybe Should BeGreaterThan 0.
There was a problem hiding this comment.
Fixed.
|
Steve Lee (@SteveL-MSFT) your feedback has been answered. Please have a look. |
|
Chatted with Aditya Patwardhan (@adityapatwardhan) offline and we found it strange that the |
|
Dongbo Wang (@daxian-dbw) The updateable help system tests blow away the help and do not restore them. https://github.com/PowerShell/PowerShell/blob/master/test/powershell/engine/Help/UpdatableHelpSystem.Tests.ps1#L180 |
|
Aditya Patwardhan (@adityapatwardhan) Thanks for finding the root cause! It looks to me that that test shouldn't remove all |
|
Dongbo Wang (@daxian-dbw) your feedback has been answered. Please have a look. |
|
Dongbo Wang (@daxian-dbw) I added another test fix. Please have a look. |
|
Dongbo Wang (@daxian-dbw) All tests have passed. Please have a look. |
There was a problem hiding this comment.
It will skip the tests on Unix plats. Is that intentional?
There was a problem hiding this comment.
Maybe
$skipTest = (Get-Command 'ssh' -ErrorAction SilentlyContinue) -eq $null
There was a problem hiding this comment.
Good point. Fixed.
|
Dongbo Wang (@daxian-dbw) I have updated the tests and all tests pass. |
|
Aditya Patwardhan (@adityapatwardhan) Can you please take a look at the test failures in Travis CI? |
* The updatable help system tests had not need to remove about help files. * Fixed tab completion tests to better disambiguate root/interop namespace. * Moved back the about_splatting test and removed update-help.
e548019 to
b5f23d9
Compare
|
Dongbo Wang (@daxian-dbw) Thanks for the update. |
|
Dongbo Wang (@daxian-dbw) All tests passed. Ready for merge. |
* Test fixes and updates to code coverage automation * Fixed UpdatableHelpSystem tests and tab completion tests * Fixed tab completion tests to better disambiguate root/interop namespace. * Skip SSH test if ssh.exe is not present
Update-Help