Add Tests for ConfirmImpact Ratings#8214
Conversation
|
@vexx32 Please look DefaultCommands.Tests.ps1. There is a trick with moderated loading standard modules. |
|
@SteveL-MSFT @adityapatwardhan Could you please review these new tests? |
|
@vexx32 Please address @SteveL-MSFT comments. |
49b5e32 to
2804c0e
Compare
|
@iSazonov built ConfirmImpact tests into the existing file per @SteveL-MSFT's recommendations. Haven't tested it just yet, but it should be sound. I'll let CI check it while I get some sleep and figure out any issues tomorrow. Also did a rebase due to some outstanding merge conflicts & resolved those issues. @SteveL-MSFT I notice that there are references to |
|
$FullCLR helps to see the differences from Windows PowerShell, helps to document. Also we can run the test with Windows PowerShell to keep it up-to-date. From the test we can see that we still need to port. |
|
Okay, it took me a bit to get that working as it perhaps should, but there we go. 😄 |
|
@vexx32 Please resolve the merge conflict. @SteveL-MSFT Please update your code review. |
9020fa9 to
b93abcb
Compare
|
There we go, all done! 😄 |
|
@vexx32 Please have a look at the test failures on macOS and Linux CI. Also, please update the PR description to remove reference to : |
|
@adityapatwardhan Tests and PR description updated! |
|
@vexx32 Please resolve the merge conflit. @SteveL-MSFT Please update your code review. |
5 similar comments
|
@vexx32 Please resolve the merge conflit. @SteveL-MSFT Please update your code review. |
|
@vexx32 Please resolve the merge conflit. @SteveL-MSFT Please update your code review. |
|
@vexx32 Please resolve the merge conflit. @SteveL-MSFT Please update your code review. |
|
@vexx32 Please resolve the merge conflit. @SteveL-MSFT Please update your code review. |
|
@vexx32 Please resolve the merge conflit. @SteveL-MSFT Please update your code review. |
|
@vexx32 Please resolve the merge conflit. @SteveL-MSFT Please update your code review. |
Also test that number of cmdlets matches what is available.
Might be needed since unix doesn't have some commands soft-fail for missing cmdlets on unix OSes for ConfirmImpact checks
Fix typos Remove unnecessary sort
Use proper import of default modules Remove unneeded check Fix spacing
Remove unneeded additional test file Update tests with -Because for easier debugging Remove tabs for test CSV string Reorganise test I think I fixed it (famous last words, eh?) Add back missing Present flags for PSHostProcess items
149668d to
e909162
Compare
|
I think that takes care of it. Managed to figure out which commands have been added since last commit, so hopefully that should be sufficient, but I'm gonna wait and see if CI reckons I missed something and fix it as it happens. 😄 |
|
@vexx32 Please resolve the merge conflit. @SteveL-MSFT Please update your code review. |
|
Merge conflict is sorted /cc @SteveL-MSFT @iSazonov 😄 |
SteveL-MSFT
left a comment
There was a problem hiding this comment.
Sorry for the delay, been busy and then got backlogged on 90 GitHub notifications but finally got to this one
|
All good, I imagine it gets fun around the holidays over there. 😄 |
PR Summary
/cc @iSazonov
Adds aspect to tests in
test/powershell/engine/Basic/DefaultCommands.Tests.ps1that checks default cmdlets' reportedConfirmImpactlevel.Also fixes a related logical error in
/tests/powershell/Language/Classes/Scripting.Classes.BasicParsing.Tests.ps1where the test attempts to query the wrong property on the class object, and then tests forConfirmImpactrating without implementingShouldProcess.Related: #8209
These tests will be modified in #8209 when needed.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests