FredBainbridge

Pester - TestGroups Stack Corrupted

Exception calling "LeaveTestGroup" with "2" argument(s): "TestGroups stack corrupted: Expected name/hint of '$name','$hint'.. Found '[context]','Context'." $pester.LeaveTestGroup($testScript.Path, 'Script') This is caused when your function is calling “exit” while testing. Or at least it did in my case. Properly mock whatever is calling exit or find a way to not use exit! Look at the source code here for hints as to what is actually happening. Pester makes sure it is still in the context it started as before leaving a test group. Read more →

Import-SMAModule fails!

When using Import-SMAModule you get a wild error. Import-SMAModule : Could not import the module []: System.Data.Services.DataServiceClientException: The underlying connection was closed: An unexpected error occured on a receive. ---> ... Make sure the module you are importing is a zipped folder with the proper module files! This is clearly documented. :) Read more →