Keystone test coverage

Nosetest provides a command line switch which will generate statistics on what lines of code are run during tests.

For Keystone, we can generate them using:

cd /opt/stack/keystone
./run_tests.sh -c

The tests are put in tests/cover/

I ran them recently and posted the current stats to my fedorapeople site.

Note that I posted them using rsync. I use rsync infrequently enough that I have to look up the correct command line in the man page each time.

rsync -ac tests/cover/ admiyo@fedorapeople.org:public_html/openstack/keystone/coverage/

Some things that jump out from the report:

keystone.identity.backends.pam Is very low: 41%. We should either remove this backend or get it functional.

keystone.contrib.ec2.backends.sql
keystone.contrib.ec2.core are both in the 60s. I know I looked at these before, and there are bugs open against them. They could use better tests.

Most of the other files that are at less than 100% are due primarily to Exception code that is not run. This says to me that, while we do a decent job of positive thread testing, we need to work on the more exceptional cases.

For the keystone client:

cd /opt/stack/python-keystoneclient/
./run_tests.sh -c
rsync -ac covhtml/ admiyo@fedorapeople.org:public_html/openstack/python-keystoneclient/coverage/

The results are posted here.

2 thoughts on “Keystone test coverage

  1. Adam,
    On a fresh devstack install, it fails to create Virtual Env. Any hints ?

    [ keystone]$ ./run_tests.sh -c
    No virtual environment found…create one? (Y/n) Y
    Creating venv… done.
    Installing pip in venv… done.
    Installing dependencies with pip (this can take a while)…
    Downloading/unpacking pip==1.1
    Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate:
    Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip==1.1
    Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate:
    Will skip URL https://pypi.python.org/simple/ when looking for download links for pip==1.1
    Cannot fetch index base URL https://pypi.python.org/simple/
    Could not fetch URL https://pypi.python.org/simple/pip/1.1: There was a problem confirming the ssl certificate:
    Will skip URL https://pypi.python.org/simple/pip/1.1 when looking for download links for pip==1.1
    Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate:
    Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip==1.1
    Could not find any downloads that satisfy the requirement pip==1.1
    No distributions at all found for pip==1.1
    Storing complete log in /home/kashyap/.pip/pip.log
    Command “tools/with_venv.sh pip install –upgrade pip==1.1” failed.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.