Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1029)

Issue 88100045: Add tests to cf-cloud-controller

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by lomov.as
Modified:
11 years, 2 months ago
Reviewers:
benjamin.saller, mp+215906
Visibility:
Public.

Description

Add tests to cf-cloud-controller This is my first time using lbox. https://code.launchpad.net/~lomov-as/charms/trusty/cf-cloud-controller/tests/+merge/215906 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Add tests to cf-cloud-controller #

Total comments: 11

Patch Set 3 : Add tests to cf-cloud-controller #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -11 lines) Patch
M .bzrignore View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M Makefile View 1 2 1 chunk +47 lines, -10 lines 6 comments Download
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A bin/nosetests View 1 chunk +3 lines, -0 lines 0 comments Download
A bin/test_setup View 1 2 1 chunk +16 lines, -0 lines 1 comment Download
A deps/Jinja2-2.7.2-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/Tempita-0.5.2-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/extras-0.0.3-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/httplib2-0.8-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/keyring-3.7-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/launchpadlib-1.10.2-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/lazr.authentication-0.1.2-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/lazr.restfulclient-0.13.3-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/lazr.uri-1.0.3-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/mock-1.0.1-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/netaddr-0.7.11-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/nose-1.3.1-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/oauth-1.0.1-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/python_mimeparse-0.1.4-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/setuptools-3.4.1-py2.py3-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/shelltoolbox-0.2.1-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/shelltoolbox-0.2.1-py2.7.egg View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/testresources-0.2.7-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/testtools-0.9.35-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/wadllib-1.3.2-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/wsgi_intercept-0.6.1-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
A deps/wsgiref-0.1.2-py2-none-any.whl View 0 chunks +-1 lines, --1 lines 0 comments Download
M hooks/charmhelpers/contrib/cloudfoundry/upstart_helper.py View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M hooks/install View 1 2 4 chunks +18 lines, -19 lines 0 comments Download
A test_requirements.txt View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
A tests/test_install.py View 1 2 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 5
lomov.as
Please take a look.
11 years, 2 months ago (2014-04-15 15:44:36 UTC) #1
benjamin.saller
Thanks for doing this branch and for using lbox. At this time however I'm not ...
11 years, 2 months ago (2014-04-15 18:47:55 UTC) #2
lomov.as
https://codereview.appspot.com/88100045/diff/20001/Makefile File Makefile (right): https://codereview.appspot.com/88100045/diff/20001/Makefile#newcode14 Makefile:14: sdeb: source I like idea of tests that can ...
11 years, 2 months ago (2014-04-16 11:04:18 UTC) #3
lomov.as
Please take a look.
11 years, 2 months ago (2014-04-18 19:28:56 UTC) #4
benjamin.saller
11 years, 2 months ago (2014-04-18 20:50:32 UTC) #5
I like the deps changes in this version. The makefile still needs some work. 

The test itself is largely unchanged. My previous concerns remain.

I'd rather have no test of install than one that mocks everything it does. If
the only test of install is a functional one then we can write it in that style
as an amulet test. 

hooks.py looks like it depends entirely on charm helpers. If there isn't code
here that lends itself well to unit testing thats ok, in the case of making
single method calls into helpers for hooks I'd say we're doing well. It reduces
some of the testing burden. 

I'd suggest you make the changes to the makefile and remove the install test for
now, then in another branch we can write it as an integration test with amulet,
where we can verify those changes on the deployed unit.

https://codereview.appspot.com/88100045/diff/40001/Makefile
File Makefile (right):

https://codereview.appspot.com/88100045/diff/40001/Makefile#newcode8
Makefile:8: @echo "make sdeb - Create debian source package"
remove unused targets from makefile

https://codereview.appspot.com/88100045/diff/40001/Makefile#newcode14
Makefile:14: deb: source
We don't need deb either, charms don't become packages

https://codereview.appspot.com/88100045/diff/40001/Makefile#newcode18
Makefile:18: scripts/update-revno
again, not needed, charms are not managed as python packages

https://codereview.appspot.com/88100045/diff/40001/Makefile#newcode27
Makefile:27: rm -rf deps
If you are arguing to keep deps with wheel then we shouldn't remove them.

https://codereview.appspot.com/88100045/diff/40001/Makefile#newcode40
Makefile:40: @echo Starting fast tests...
ftests would be integration tests in the case of a charm. Charm functional tests
are deployed and run with amulet. 
Remove this target as well.

https://codereview.appspot.com/88100045/diff/40001/Makefile#newcode45
Makefile:45: @flake8 --ignore=E123,E501 $(PROJECT) $(TESTS) && echo OK
We don't need the --ignore, we can follow pep8 properly.

https://codereview.appspot.com/88100045/diff/40001/bin/test_setup
File bin/test_setup (right):

https://codereview.appspot.com/88100045/diff/40001/bin/test_setup#newcode5
bin/test_setup:5: bzr checkout --lightweight
lp:~lomov-as/+junk/cf-charms-test-assets test-assets
This is a good idea, you should push this to ~cf-charmers though, not +junk if
we are going to use it in the charms.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b