Closed logicminds closed 3 years ago
I think about the only item that needs to be tweaked here is the travis file as it currently installs foreman with the kitchen sink option. So we need to pass a bunch of --without-XXX flags to bundle install so that the process to install all the gems goes much quicker.
I can add this to the travis file if you can tell me what options I need to pass.
To be honest, I'm not massively keen on this approach. We went to some effort to remove this test style from the plugins, in favour of the current style. It was originally developed in foreman_discovery, and copied to a few other plugins including foreman_hooks (you can see from git blame that hooks hasn't touched that task for 2 years - it's actually tested here: http://ci.theforeman.org/job/test_plugin_foreman_hooks/).
This style creates a huge amount of duplication - creating the app that the code is supposed to run inside, inside the plugin itself is (to my mind) completely backwards. It was also causing huge test load and bandwidth usage due to all the git clones that get called.
I can see value in Travis if you don't have any other CI infrastructure in place, but we do (namely, Jenkins). For local tests, I assume a developer would have an install of Foreman to play with anyway - so testing within that local instance seems the way to go, at least to me.
Are there other use cases for this I've not thought of?
Maybe I just don't understand the jenkins setup and how I can use it to test my code. Other than travis there is not really a use case.
I appologize, this plugin has not been maintained for a long time. Given it has now conflicts, I'm closing. I'll try to find an active maintainer, please consider reopening after the rebase (in this case trivial). The ruby version should be updated too now.
added Gemfile to support local unit testing
Note: the gemfile, and rakefile are from foreman_hooks repo