Comment 6 for bug 1495547

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/223203
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f8f822afafbc58258bfe0653b21be86a5e648305
Submitter: Jenkins
Branch: master

commit f8f822afafbc58258bfe0653b21be86a5e648305
Author: Matt Riedemann <email address hidden>
Date: Mon Sep 14 09:04:51 2015 -0700

    Make test_revoke_cert_project_not_found_chdir_fails deterministic

    Commit b64cebe2eb71a6c2275f6af76839a0b36cf56cbd removed the mock on
    os.chdir to always fail with OSError in the test.

    The revoke_cert method is using the ca_folder method to get the path and
    that checks CONF.use_project_ca which is by default False, so the
    project_id isn't even used in the path we're changing to before running
    the command, it just uses the global static CONF.ca_path. If that path
    exists when this test runs, os.chdir won't raise OSError and the
    assertion in the test will fail.

    This change makes the test deterministic by (1) setting
    use_project_ca=True and (2) using a random project_id uuid.

    Closes-Bug: #1495547

    Change-Id: I0dc6574b6644aa09028a07503a3d0b82e68e69d2