Hide Forgot
This has come up in the past but we keep getting sloppy and not doing it. Directories should be configurable so that we can mock them out entirely during test runs. There is no reason a test case should affect "real" files and directories on the filesystem. They should be configured to write to temporary directories where permissions aren't an issue and the risk of affecting live data is minimized. The following was seen by a pulp user trying to run the tests. (tests that passed not included in this paste)... ====================================================================== ERROR: test_create_product_repo (test_product_repo.TestProductRepo) ---------------------------------------------------------------------- Traceback (most recent call last): File "/workspace/pulp/test/unit/test_product_repo.py", line 63, in test_create_product_repo self.rapi.create_product_repo(content_set, cert_data, groupid="test-product") File "/workspace/pulp/test/unit/../../src/pulp/server/compat.py", line 40, in _decorator return decorator(*args,**kwargs) File "/workspace/pulp/test/unit/../../src/pulp/server/auditing.py", line 204, in _audit result = method(*args, **kwargs) File "/workspace/pulp/test/unit/../../src/pulp/server/api/repo.py", line 321, in create_product_repo cert_files = self._write_certs_to_disk(groupid, cert_data) File "/workspace/pulp/test/unit/../../src/pulp/server/api/repo.py", line 290, in _write_certs_to_disk os.makedirs(cert_dir) File "/usr/lib64/python2.6/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/etc/pki/content/test-product'
I'm going to close as not a bug. I think the user was running out of test as the working directory which was causing the config override to not be picked up.