Merge lp:~tvansteenburgh/charms/precise/block-storage-broker/fix-tests into lp:charms/block-storage-broker

Proposed by Tim Van Steenburgh
Status: Merged
Merged at revision: 57
Proposed branch: lp:~tvansteenburgh/charms/precise/block-storage-broker/fix-tests
Merge into: lp:charms/block-storage-broker
Diff against target: 23 lines (+9/-2)
1 file modified
Makefile (+9/-2)
To merge this branch: bzr merge lp:~tvansteenburgh/charms/precise/block-storage-broker/fix-tests
Reviewer Review Type Date Requested Status
Charles Butler (community) Approve
Antonio Rosales (community) Needs Fixing
Review via email: mp+234168@code.launchpad.net

Description of the change

Fix tests.

To post a comment you must log in.
Revision history for this message
Charles Butler (lazypower) wrote :

This doesn't fix the tests.

test_hooks
  py ... [ERROR]
test_util
  py ... [ERROR]

===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/home/charles/tmp/charms/precise/block-storage-broker/.venv/local/lib/python2.7/site-packages/twisted/trial/runner.py", line 586, in loadByNames
    things.append(self.findByName(name))
  File "/home/charles/tmp/charms/precise/block-storage-broker/.venv/local/lib/python2.7/site-packages/twisted/trial/runner.py", line 395, in findByName
    return filenameToModule(name)
  File "/home/charles/tmp/charms/precise/block-storage-broker/.venv/local/lib/python2.7/site-packages/twisted/trial/runner.py", line 87, in filenameToModule
    return _importFromFile(fn)
  File "/home/charles/tmp/charms/precise/block-storage-broker/.venv/local/lib/python2.7/site-packages/twisted/trial/runner.py", line 106, in _importFromFile
    module = imp.load_source(moduleName, fn, fd)
  File "test_hooks.py", line 4, in <module>
    import mocker
exceptions.ImportError: No module named mocker

test_hooks.py
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/home/charles/tmp/charms/precise/block-storage-broker/.venv/local/lib/python2.7/site-packages/twisted/trial/runner.py", line 586, in loadByNames
    things.append(self.findByName(name))
  File "/home/charles/tmp/charms/precise/block-storage-broker/.venv/local/lib/python2.7/site-packages/twisted/trial/runner.py", line 395, in findByName
    return filenameToModule(name)
  File "/home/charles/tmp/charms/precise/block-storage-broker/.venv/local/lib/python2.7/site-packages/twisted/trial/runner.py", line 87, in filenameToModule
    return _importFromFile(fn)
  File "/home/charles/tmp/charms/precise/block-storage-broker/.venv/local/lib/python2.7/site-packages/twisted/trial/runner.py", line 106, in _importFromFile
    module = imp.load_source(moduleName, fn, fd)
  File "test_util.py", line 3, in <module>
    import mocker
exceptions.ImportError: No module named mocker

test_util.py
-------------------------------------------------------------------------------
Ran 2 tests in 0.002s

FAILED (errors=2)

review: Needs Fixing
Revision history for this message
Antonio Rosales (arosales) wrote :

Tim,

Thanks for your contribution to ensure the block-storage-broker charm is of high quality by working to fix the charm tests.

I am also seeing what Chuck reported in his review:
http://paste.ubuntu.com/8368201/

-thanks,
Antonio

review: Needs Fixing
Revision history for this message
Charles Butler (lazypower) wrote :

Tim,

Hi5, great success. Tests pass.

Thanks for this contribution.

+1 LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2014-03-21 17:05:09 +0000
3+++ Makefile 2014-09-10 18:09:00 +0000
4@@ -2,10 +2,17 @@
5 CHARM_DIR=`pwd`
6
7 clean:
8+ rm -rf .venv
9 find . -name *.pyc | xargs -r rm
10 find . -name _trial_temp | xargs -r rm -r
11-test:
12- cd hooks; trial -j3 test_*py
13+
14+test: .venv
15+ cd hooks; ../.venv/bin/trial -j3 test_*py
16+
17+.venv:
18+ sudo apt-get install python-virtualenv python-apt
19+ virtualenv .venv --system-site-packages
20+ .venv/bin/pip install -I boto twisted pyyaml
21
22 lint:
23 @flake8 --exclude hooks/charmhelpers hooks

Subscribers

People subscribed via source and target branches

to all changes: