test_create_certs ssl certificate directory is wrongly set

Bug #1086812 reported by Ionuț Arțăriși
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Ionuț Arțăriși

Bug Description

On a fresh devstack clone + .stack.sh, I get a failing unit test. (the error only shows up when at least one other unit test is ran together with it which I suppose is because of the test cases' setup/teardown methods).

$ ./run_tests.sh -N test_wsgi test_cert_setup
test_query_string_available (test_wsgi.ApplicationTest) ... ok
test_render_response (test_wsgi.ApplicationTest) ... ok
test_render_response_custom_headers (test_wsgi.ApplicationTest) ... ok
test_render_response_custom_status (test_wsgi.ApplicationTest) ... ok
test_render_response_no_body (test_wsgi.ApplicationTest) ... ok
test_response_content_type (test_wsgi.ApplicationTest) ... ok
test_create_certs (test_cert_setup.CertSetupTestCase) ... ERROR

======================================================================
ERROR: test_create_certs (test_cert_setup.CertSetupTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/stack/keystone/tests/test_cert_setup.py", line 52, in tearDown
    shutil.rmtree(rootdir(SSLDIR))
  File "/usr/lib/python2.7/shutil.py", line 237, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 235, in rmtree
    names = os.listdir(path)
OSError: [Errno 2] No such file or directory: '/opt/stack/keystone/tests/ssl/'

----------------------------------------------------------------------
Ran 7 tests in 0.076s

FAILED (errors=1)

Changed in keystone:
assignee: nobody → Ionuț Arțăriși (mapleoin)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/17341
Committed: http://github.com/openstack/keystone/commit/77dee93763e4941b07f628c1c67d925503a5df51
Submitter: Jenkins
Branch: master

commit 77dee93763e4941b07f628c1c67d925503a5df51
Author: Ionuț Arțăriși <email address hidden>
Date: Mon Dec 3 11:59:20 2012 +0100

    use keystone test and change config during setUp

    Also fixes this traceback which I keep getting on devstack:

    ERROR: test_create_certs (tests.test_cert_setup.CertSetupTestCase)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/opt/stack/keystone/tests/test_cert_setup.py", line 52, in tearDown
        shutil.rmtree(rootdir(SSLDIR))
      File "/usr/lib/python2.7/shutil.py", line 237, in rmtree
        onerror(os.listdir, path, sys.exc_info())
      File "/usr/lib/python2.7/shutil.py", line 235, in rmtree
        names = os.listdir(path)
    OSError: [Errno 2] No such file or directory: '/opt/stack/keystone/tests/ssl/'

    Fixes bug 1086812

    Change-Id: Iba10822aaf1284549d610bb1172df03ffc48f363

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.