Rename target to 'test' and use AMULET_OS_VIP to handoff the vip
This commit is contained in:
parent
77c07abdc9
commit
6a41ee8da1
6
Makefile
6
Makefile
|
@ -9,9 +9,11 @@ lint:
|
|||
unit_test:
|
||||
@$(PYTHON) /usr/bin/nosetests --nologcapture unit_tests
|
||||
|
||||
functional_test:
|
||||
test:
|
||||
@echo Starting amulet tests...
|
||||
@juju test -v -p AMULET_HTTP_PROXY --timeout 900
|
||||
#NOTE(beisner): can remove -v after bug 1320357 is fixed
|
||||
# https://bugs.launchpad.net/amulet/+bug/1320357
|
||||
@juju test -v -p AMULET_HTTP_PROXY,AMULET_OS_VIP --timeout 900
|
||||
|
||||
bin/charm_helpers_sync.py:
|
||||
@mkdir -p bin
|
||||
|
|
|
@ -20,10 +20,10 @@ for pkg in $PACKAGES; do
|
|||
done
|
||||
|
||||
|
||||
if [ ! -f "$(dirname $0)/../local.yaml" ]; then
|
||||
echo "To run these amulet tests a vip is needed, create a file called \
|
||||
local.yaml in the charm dir, this file must contain a 'vip', if you're \
|
||||
using the local provider with lxc you could use a free IP from the range \
|
||||
10.0.3.0/24"
|
||||
exit 1
|
||||
fi
|
||||
#if [ ! -f "$(dirname $0)/../local.yaml" ]; then
|
||||
# echo "To run these amulet tests a vip is needed, create a file called \
|
||||
#local.yaml in the charm dir, this file must contain a 'vip', if you're \
|
||||
#using the local provider with lxc you could use a free IP from the range \
|
||||
#10.0.3.0/24"
|
||||
# exit 1
|
||||
#fi
|
||||
|
|
|
@ -12,8 +12,8 @@ class BasicDeployment(unittest.TestCase):
|
|||
self.vip = None
|
||||
if vip:
|
||||
self.vip = vip
|
||||
elif 'VIP' in os.environ:
|
||||
self.vip = os.environ.get('VIP')
|
||||
elif 'AMULET_OS_VIP' in os.environ:
|
||||
self.vip = os.environ.get('AMULET_OS_VIP')
|
||||
elif os.path.isfile('local.yaml'):
|
||||
with open('local.yaml', 'rb') as f:
|
||||
self.cfg = yaml.safe_load(f.read())
|
||||
|
@ -21,8 +21,8 @@ class BasicDeployment(unittest.TestCase):
|
|||
self.vip = self.cfg.get('vip')
|
||||
else:
|
||||
amulet.raise_status(amulet.SKIP,
|
||||
("please set the vip in local.yaml "
|
||||
"to run this test suite"))
|
||||
("please set the vip in local.yaml or env var "
|
||||
"AMULET_OS_VIP to run this test suite"))
|
||||
|
||||
def run(self):
|
||||
# The number of seconds to wait for the environment to setup.
|
||||
|
@ -30,7 +30,11 @@ class BasicDeployment(unittest.TestCase):
|
|||
|
||||
self.d = amulet.Deployment(series="trusty")
|
||||
self.d.add('percona-cluster', units=self.units)
|
||||
self.d.add('hacluster')
|
||||
|
||||
# NOTE(freyes): we use hacluster/next, because stable doesn't support
|
||||
# location rules definition.
|
||||
self.d.add('hacluster',
|
||||
charm='lp:~openstack-charmers/charms/trusty/hacluster/next')
|
||||
self.d.relate('percona-cluster:ha', 'hacluster:ha')
|
||||
|
||||
cfg_percona = {'sst-password': 'ubuntu',
|
||||
|
|
Loading…
Reference in New Issue