opinkerfi / adagios

Adagios - Web Based Nagios Configuration
GNU Affero General Public License v3.0
330 stars 75 forks source link

Isolated environment for tests suite #361

Closed matthieucan closed 10 years ago

matthieucan commented 10 years ago

Hi, [I hope you don't mind using the issues tracker for wishlist-related items, but as this one requires further discussion I thought it would be better] I think the tests suite should run in an isolated environment for these 2 main reasons:

What I further suggest:

What do you think?

palli commented 10 years ago

What I further suggest: use a settings_tests.py, which imports settings.py and overrides pertinent values.

Not a bad idea. adagios.conf actually does this already, but might need some modifications so it fits the testing better.

and something like a fake livestatus endpoint

The same idea floated in the pynag project, and now there is a pynag.Utils.misc.FakeNagiosEnvironment which starts up an isolated instance of nagios+configs+livestatus. This could be really handy inside adagios as well. I'll see if i can cook something up.

matthieucan commented 10 years ago

Wow awesome! Gonna have fun with this :smiley:

matthieucan commented 10 years ago

Thank you very much!

palli commented 10 years ago

I think it is safe to close this issue for now, the configuration used in the isolated environment is very minimal as is. But as need arises in the future we can add hosts/service. (for example use dataset01 directoy in pynag/tests/)

matthieucan commented 10 years ago

Alright!