You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found this error in the CI Pipeline, in the PowerShell unit tests:
WARNING: Could not disconnect from sharepoint
: The term 'Disconnect-PnPOnline' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
This looks like an oversight in mocking the Disconnect modules. The cmdlet isn't mocked like all the other disconnect cmdlets in this test are. Since the assumption is they are mocked, the proper import is not used. But this test doesn't require actually running Disconnect-PnPOnline. I believe it just needs to be mocked.
🐛 Summary
Found this error in the CI Pipeline, in the PowerShell unit tests:
This looks like an oversight in mocking the Disconnect modules. The cmdlet isn't mocked like all the other disconnect cmdlets in this test are. Since the assumption is they are mocked, the proper import is not used. But this test doesn't require actually running Disconnect-PnPOnline. I believe it just needs to be mocked.
To reproduce
Look here:
https://github.com/cisagov/ScubaGear/actions/runs/13456805458/job/37602667447
Expected behavior
If test is failing, it should fail the unit test rather than failing silently. If it's not really a failure, then it should be mocked properly.
The text was updated successfully, but these errors were encountered: