devblackops / NetScaler

PowerShell module for interacting with Citrix NetScaler via the Nitro API
Apache License 2.0
69 stars 32 forks source link

Test fail because sort and ls aliases are used in Tests #53

Open dbroeglin opened 7 years ago

dbroeglin commented 7 years ago

Expected Behavior

Tests should run cross platform as long as no Windows specific behavior is tested.

Current Behavior

Tests fail on MacOSX. The reason is documented here: https://github.com/PowerShell/PowerShell/issues/827 Some aliases have been removed on Mac and Linux to avoid conflicts with native command names.

Possible Solution

Use full cmdlet names instead of aliases. Which is encouraged anyway when writing scripts or modules.

Steps to Reproduce (for bugs)

Invoke-Pester 

Context

I historically work on a Mac, using Windows VMs when doing PowerShell. I tried out the powershell package available on mac.

I always rerun tests on a Windows environment before pushing changes but it is convenient to be able to directly develop on the Mac.

BTW, executing the build fails because PSake is doing quite a bit of Windows specific initialization, looking for .Net framework in windir, looking into the registry, etc. Which is weird for a build tool. But Invoke-Pester works. Do you think that the just running Invoke-Pester behavior could be conserved in the future ? If it is not too much work it would be nice to be able to run the tests and the module on a Mac.

Your Environment

devblackops commented 7 years ago

I haven't done much experimenting with PowerShell on OS X yet. It's not surprising that there will be issues with popular modules like psake. Just taking a quick glance at the psake source, it looks like the support for msbuild is why it checks for .Net versions in the registry.

Running Script Analyzer (if it works on OS X, haven't tried myself) and Pester should be enough if you want to develop on the Mac.

BTW, have you seen any issues with this module on OS X?