update makefile, amulet setup

This commit is contained in:
Ryan Beisner
2015-07-01 04:02:23 +00:00
parent 5f5dc55f0d
commit edb27eb99e
8 changed files with 55 additions and 12 deletions

View File

@@ -2,18 +2,17 @@
PYTHON := /usr/bin/env python PYTHON := /usr/bin/env python
lint: lint:
@flake8 --exclude hooks/charmhelpers actions hooks unit_tests tests @flake8 --exclude hooks/charmhelpers,tests/charmhelpers \
actions hooks unit_tests tests
@charm proof @charm proof
unit_test:
@echo Starting unit tests...
@$(PYTHON) /usr/bin/nosetests --nologcapture --with-coverage unit_tests
test: test:
@# Bundletester expects unit tests here.
@echo Starting unit tests...
@$(PYTHON) /usr/bin/nosetests --nologcapture --with-coverage unit_tests
functional_test:
@echo Starting Amulet tests... @echo Starting Amulet tests...
# coreycb note: The -v should only be temporary until Amulet sends
# raise_status() messages to stderr:
# https://bugs.launchpad.net/amulet/+bug/1320357
@juju test -v -p AMULET_HTTP_PROXY,AMULET_OS_VIP --timeout 2700 @juju test -v -p AMULET_HTTP_PROXY,AMULET_OS_VIP --timeout 2700
bin/charm_helpers_sync.py: bin/charm_helpers_sync.py:
@@ -25,6 +24,6 @@ sync: bin/charm_helpers_sync.py
@$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers-hooks.yaml @$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers-hooks.yaml
@$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers-tests.yaml @$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers-tests.yaml
publish: lint unit_test publish: lint test
bzr push lp:charms/keystone bzr push lp:charms/keystone
bzr push lp:charms/trusty/keystone bzr push lp:charms/trusty/keystone

View File

@@ -5,7 +5,9 @@ description: |
Keystone is an OpenStack project that provides Identity, Token, Catalog and Keystone is an OpenStack project that provides Identity, Token, Catalog and
Policy services for use specifically by projects in the OpenStack family. It Policy services for use specifically by projects in the OpenStack family. It
implements OpenStacks Identity API. implements OpenStacks Identity API.
categories: ["misc"] tags:
- miscellaneous
- openstack
provides: provides:
nrpe-external-master: nrpe-external-master:
interface: nrpe-external-master interface: nrpe-external-master

View File

@@ -5,6 +5,10 @@ set -ex
sudo add-apt-repository --yes ppa:juju/stable sudo add-apt-repository --yes ppa:juju/stable
sudo apt-get update --yes sudo apt-get update --yes
sudo apt-get install --yes python-amulet \ sudo apt-get install --yes python-amulet \
python-keystoneclient \ python-cinderclient \
python-distro-info \
python-glanceclient \ python-glanceclient \
python-novaclient python-heatclient \
python-keystoneclient \
python-novaclient \
python-swiftclient

0
tests/017-basic-trusty-kilo Normal file → Executable file
View File

0
tests/019-basic-vivid-kilo Normal file → Executable file
View File

View File

@@ -0,0 +1,11 @@
#!/usr/bin/python
"""Amulet tests on a basic keystone deployment on trusty-liberty."""
from basic_deployment import KeystoneBasicDeployment
if __name__ == '__main__':
deployment = KeystoneBasicDeployment(series='trusty',
openstack='cloud:trusty-liberty',
source='cloud:trusty-updates/liberty')
deployment.run_tests()

View File

@@ -0,0 +1,9 @@
#!/usr/bin/python
"""Amulet tests on a basic keystone deployment on wily-liberty."""
from basic_deployment import KeystoneBasicDeployment
if __name__ == '__main__':
deployment = KeystoneBasicDeployment(series='wily')
deployment.run_tests()

18
tests/tests.yaml Normal file
View File

@@ -0,0 +1,18 @@
bootstrap: true
reset: true
virtualenv: true
makefile:
- lint
- test
sources:
- ppa:juju/stable
packages:
- amulet
- python-amulet
- python-cinderclient
- python-distro-info
- python-glanceclient
- python-heatclient
- python-keystoneclient
- python-novaclient
- python-swiftclient