[Pulp-list] Error with Nosetest

Jason Rist jrist at redhat.com
Wed Jan 26 15:29:46 UTC 2011


On 01/26/2011 06:32 AM, Jay Dobies wrote:
> One other thing I forgot to mention. The tests run fine for me if I cd
> to test/unit and run "nosetests -s". I think the issue is that you're
> specifying test as the working directory, but our tests use relative
> directories to establish the source path. So I'm thinking making them
> run out of test as the working directory is causing it to not pick up
> our config overrides.
> 
> On 01/26/2011 08:16 AM, Jay Dobies wrote:
>> This might have happened if you had the RPMs installed and then changed
>> over to the developer setup. Did you run "python pulp-dev.py --debug
>> --install" ? That should create any directories you need and set the
>> right permissions.
> 
>> That said, I'm a bit curious about that test. They should be
>> configurable so that we're not writing to real directories like /etc/pki
>> during their runs. I'll file a bug for that.

I've never done the RPM method.  I started from source.  I agree, this
appears to just be a bug.  I did run the pulp-dev.py - although not with
--debug (that wasn't specified in the setup).  I'll try running from
test/unit.

-J


> 
>> On 01/25/2011 07:06 PM, Jason Rist wrote:
>>> Hey All - Did the full gamut of upgrades and I ran nosetests to see if
>>> everything passed.  I have one test that isn't passing, so I'm just
>>> curious if I missed a perm somewhere?  Anyone seen this one?
> 
>>> nosetests -s -w test/ unit/
> 
>>> (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'
>>> -------------------- >> begin captured logging << --------------------
>>> auditing: INFO: [2011-01-25 17:02:19.816492] Admin called RepoApi.clean on
>>> auditing: INFO: [2011-01-25 17:02:19.841817] Admin called
>>> RepoApi.create_product_repo on groupid: test-product, content_set:
>>> [{'content_set_label': 'rhel-server', 'content_rel_url':
>>> '/content/dist/rhel/server/$releasever/$basearch/os'}]
>>> --------------------- >> end captured logging << ---------------------
> 
>>> ----------------------------------------------------------------------
>>> Ran 262 tests in 90.375s
> 
>>> FAILED (errors=1)
>>> Exception in thread Thread-53 (most likely raised during interpreter
>>> shutdown):
>>> Traceback (most recent call last):
>>>   File "/usr/lib64/python2.6/threading.py", line 525, in __bootstrap_inner
>>>   File "/usr/lib64/python2.6/threading.py", line 477, in run
>>>   File
>>> "/workspace/pulp/test/unit/../../src/pulp/server/tasking/queue/fifo.py",
>>> line 100, in _dispatchException in thread Thread-18 (most likely raised
>>> during interpreter shutdown):Exception in thread Thread-32 (most likely
>>> raised during interpreter shutdown):
>>>  Exception in thread Thread-28 (most likely raised during interpreter
>>> shutdown):


-J
-- 
Jason E. Rist
Senior Software Engineer
Systems Management and Cloud Enablement
Red Hat, Inc.
+1.919.754.4048
Freenode: jrist




More information about the Pulp-list mailing list