~doanac/uci-engine/integration-speed-up

Viewing all changes in revision 562.

  • Committer: Andy Doan
  • Date: 2014-06-11 16:07:29 UTC
  • Revision ID: andy.doan@canonical.com-20140611160729-xqthi3v5daeykopw
integration tests: allow re-use of a deployed environment

This allows us to deploy once and then run our integration tests
against a deployed environment. This greatly speeds up local testing.

This is disabled by default, but specifying DEPLOYED=1 in your
environment allows you take advantage of this. I'm running things
at home with:

 DEPLOYED=1 JUJU_REPOSITORY=`pwd`/tmp/charms PATH=$PATH:`pwd`/branches/juju-deployer JUJU_DEPLOYER_DIR=`pwd`/tmp  ./tests/test_webui.py

I'm not a huge fan of "DEPLOYED=1" but unittest.main has its own argparse
logic, so we screw that up if we try to accept CLI args. Even if this
idea is terrible, its local to one place so we can easily fix it in
the future w/o touching our other code.

This makes testing the webui go from 76s to 4s when using juju-lxc

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: