1dustindavis / gorilla

Munki-like Application Management for Windows
Apache License 2.0
186 stars 21 forks source link

Script checks now can install/uninstall packages #87

Closed oktN closed 4 years ago

oktN commented 5 years ago

ATM, script checks are able to perform installations if necessary but uninstalls don't work (Gorilla is doing the oposite of what it have to do, it tries to uninstall a package when is not installed...), with this change Gorilla client will be able to uninstall packages when have to.

I've compiled and tested this code on my Windows vagrant box, but IDK how to run the unit tests on my Mac, I'm a Golang newbie, sorry.

Regards

1dustindavis commented 5 years ago

Thanks for the PR!!

I have only been able to quickly glance at your changes, but I hope to spend more time on it tomorrow.

You should be able to run local tests on macOS by running make test from the root of the gorilla directory. Regardless, I was able to get Appveyor working again and you can now see the results of the unit tests there.

The tests are currently failing because you need to add the new argument to the checkScript tests in status_test.go:

pkg\status\status_test.go:252:34: not enough arguments in call to checkScript
    have (catalog.Item, string)
    want (catalog.Item, string, string)
pkg\status\status_test.go:260:33: not enough arguments in call to checkScript
    have (catalog.Item, string)
    want (catalog.Item, string, string)
oktN commented 5 years ago

Thanks for the help, for some reason when i tried to run tests on my Mac they didn't work :(

Check out the new commits and let me know if something is wrong 👍

oktN commented 4 years ago

I've messed up a bit with the branches in my fork, thats why I have reverted to the correct commit, now I think tests fails because of a self-signed certificate.

1dustindavis commented 4 years ago

Merging despite appveyor failure. Local tests complete successfully.