glance unit tests fail if sqlite3 isn't installed

Bug #973626 reported by Mark Washenberger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Eoghan Glynn

Bug Description

See test output below.

It seems like we should probably check to see if this dependency is installed and skip the test if not. Either that or somehow add it as a dependency to tools/test-requires.

======================================================================
ERROR: test_big_int_mapping (glance.tests.functional.test_sqlite.TestSqlite)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/jobs/glance-dev-tests/workspace/glance/tests/functional/__init__.py", line 61, in wrapped
    func(*a, **kwargs)
  File "/var/lib/jenkins/jobs/glance-dev-tests/workspace/glance/tests/functional/test_sqlite.py", line 35, in test_big_int_mapping
    exitcode, out, err = execute(cmd, raise_error=True)
  File "/var/lib/jenkins/jobs/glance-dev-tests/workspace/glance/tests/utils.py", line 268, in execute
    raise RuntimeError(msg)
RuntimeError: Command sqlite3 tests.sqlite '.schema' did not succeed. Returned an exit code of 127.

STDOUT:

STDERR: /bin/sh: sqlite3: not found

----------------------------------------------------------------------

Eoghan Glynn (eglynn)
Changed in glance:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Eoghan Glynn (eglynn)
milestone: none → folsom-1
Eoghan Glynn (eglynn)
Changed in glance:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/6261

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

Reviewed: https://review.openstack.org/6261
Committed: http://github.com/openstack/glance/commit/d15ec03e5d6daf135dfcd9387122f5ade9b4a44c
Submitter: Jenkins
Branch: master

commit d15ec03e5d6daf135dfcd9387122f5ade9b4a44c
Author: Eoghan Glynn <email address hidden>
Date: Thu Apr 5 09:29:01 2012 +0100

    Skip test depending on sqlite3 if unavailable

    Fixes bug 973626

    Add @depends_on_exe to declare a test dependency on the availability
    of an executable.

    Skip TestSqlite.test_big_int_mapping if sqlite3 not available on the
    local PATH.

    Change-Id: I1b7cf0636f79422f9f31f6a88a493791897a53b4

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: folsom-1 → 2012.2
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.