theforeman / foreman_default_hostgroup

A plugin to set the default hostgroup when hosts are created.
GNU General Public License v3.0
11 stars 29 forks source link

added ability to test locally #15

Closed logicminds closed 3 years ago

logicminds commented 9 years ago
logicminds commented 9 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.

GregSutcliffe commented 9 years ago

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?

logicminds commented 9 years ago

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.

ares commented 3 years ago

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.