Putting together my first appveyor/pester test for a module and failing miserably. Integration is all working, but when I do an Import-Module in my pester test it simply doesn’t import the functions. It says it is but nothing gets imported. I’ve tried Get-Command -Module TestSQL after the import.
Anyone seen anything like this? Not sure what information I can provide but happy to post the pester scripts/yml if needed.
Hi Dave, I’ve always done just the Folder name there. I should note that this all works fine on my PC, so it’s definitely a appveyor thing. I do have explicit paths in there right now as I’m just getting this off the ground for now, but I have big plans (bwahahaha)
Anyway, the module looks like it’s loading, but when I do Get-Command -Module TestSQL I get nothing (see below). G1, G2 and G3 are all locators where I do the Get-Command right after.
Wanted to leave a last update. Loading the module using just the folder name still fails. Funny enough, this happened before when RootModule didn’t have the name of the folder in it on an earlier version of my module creation script.
That data is there now and still won’t load in appveyor, however, I did get the functions to load if I specified the PSM1 extension. I suspect some kind of issue with the manifest file, but it works fine on a regular PC (hah, on “my” PC, famous last words) and this seems to be simply an Appveyor problem.
So, now I have to get SQL properly configured so the module can be tested. Why did I pick this as my first Appveyor project?!
Hey Tom, I thought I had fixed that! Was using a hashtable and the .Keys property but it’s interested how New-ModuleManifest and Update-ModuleManifest treat that differently! I originally had something else in mind which is why I used a hashtable in this instance but that requirement went away so I think I’ll just switch over to an Array.List instead and that should resolve that problem.