philips-software / powershell-cf-api

PowerShell module can deploy and teardown CloudFoundry spaces and services via a json definition file
MIT License
5 stars 6 forks source link

rearrange public and private functions #13

Closed lipkau closed 4 years ago

lipkau commented 4 years ago

I would argue to move the Wait-Until into the private functions, as it does not bring any value for the user to get access to that function by itself. I would also argue to move Invoke-GetRequest to the public functions, so that a user would be able to benefit from the module's internal to execute explorative api calls which have no function yet.

Let me know if you are interested in a PR for this.

marklindell commented 4 years ago

Agreed. Wait-Until should be private. A PR is welcomed.

marklindell commented 4 years ago

Sorry, I just realized when I look at the details of the unit tests that failure of the unit tests is not failing the build. It appears that one of the unit tests you added is failing. I need to review the build.ps1 to see why failing of the unit test is not failing the build.

[-] Get-BaseHost.Access Script Level Variables.throws exceptions when script level variable is not set 34ms (29ms|4ms) Expected an exception, with message 'cannot be retrieved because it has not been set' to be thrown, but the message was 'baseHost is not set in script variable. Call Get-Credentials first'. from /home/runner/work/powershell-cf-api/powershell-cf-api/cf-api/Public/Get-BaseHost.ps1:22 char:13

I also see there are other failures so I need to get this fixed ASAP.

Created #30 to follow up

lipkau commented 4 years ago

check the path of the file where it is failing. it's in the old file (in /public/). looks like your git checkout didn't clean the directory properly

marklindell commented 4 years ago

Ah yes. My bad. But it's good because I was able to fix the CI to properly fail when tests fail.