Ability to run unit tests on a system without pulp-server installed
Trying to run the unit tests on a Fedora system without pulp installed, I get errors trying to read /etc/pulp/server.conf, which clearly doesn't exist.
For the tests for the plugin I'm working on, I had to mock the whole config module, and it's not pretty; the reason is that even importing the config module will attempt to read that configuration file.
I think it's reasonable to not fail if the configuration file is missing. It is also reasonable to not rely on the host's configuration when running the testsuite from a git checkout.
python -c "from pulp.server import config"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/pulp/server/config.py", line 154, in <module>
File "/usr/lib/python2.7/site-packages/pulp/server/config.py", line 113, in load_configuration
File "/usr/lib/python2.7/site-packages/pulp/server/config.py", line 105, in check_config_files
raise RuntimeError('Cannot read configuration file: %s' % config_file)
RuntimeError: Cannot read configuration file: /etc/pulp/server.conf
Please register to edit this issue