update makefile, test dependencies, meta categories; disable essex amulet test; add liberty amulet test definitions (disabled pending liberty pkgs). enable kilo amulet test targets.

This commit is contained in:
Ryan Beisner 2015-08-21 16:48:47 +00:00
parent ee9439ff59
commit f7d28379c6
10 changed files with 67 additions and 13 deletions

View File

@ -2,19 +2,17 @@
PYTHON := /usr/bin/env python
lint:
@flake8 --exclude hooks/charmhelpers --ignore=E125 hooks
@flake8 --exclude hooks/charmhelpers --ignore=E125 unit_tests tests
@flake8 --exclude hooks/charmhelpers,tests/charmhelpers \
hooks unit_tests tests
@charm proof
unit_test:
@echo Starting unit tests...
@$(PYTHON) /usr/bin/nosetests --nologcapture --with-coverage unit_tests
test:
@# Bundletester expects unit tests here.
@echo Starting unit tests...
@$(PYTHON) /usr/bin/nosetests -v --nologcapture --with-coverage unit_tests
functional_test:
@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
bin/charm_helpers_sync.py:

View File

@ -4,7 +4,8 @@ summary: "Swift proxy node"
description: |
Swift is a distributed virtual object store. This formula deploys the proxy node
to be related to storage nodes.
categories:
tags:
- openstack
- cache-proxy
provides:
nrpe-external-master:

View File

@ -4,8 +4,13 @@ set -ex
sudo add-apt-repository --yes ppa:juju/stable
sudo apt-get update --yes
sudo apt-get install --yes python-amulet \
python-swiftclient \
sudo apt-get install --yes amulet \
python-cinderclient \
python-distro-info \
python-glanceclient \
python-heatclient \
python-keystoneclient \
python-novaclient
python-neutronclient \
python-novaclient \
python-pika \
python-swiftclient

0
tests/010-basic-precise-essex Executable file → Normal file
View File

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 swift-proxy deployment on trusty-liberty."""
from basic_deployment import SwiftProxyBasicDeployment
if __name__ == '__main__':
deployment = SwiftProxyBasicDeployment(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 swift-proxy deployment on wily-liberty."""
from basic_deployment import SwiftProxyBasicDeployment
if __name__ == '__main__':
deployment = SwiftProxyBasicDeployment(series='wily')
deployment.run_tests()

View File

@ -1,6 +1,16 @@
This directory provides Amulet tests that focus on verification of swift-proxy
deployments.
test_* methods are called in lexical sort order, although each individual test
should be idempotent, and expected to pass regardless of run order.
Test name convention to ensure desired test order:
1xx service and endpoint checks
2xx relation checks
3xx config checks
4xx functional checks
9xx restarts and other final checks
In order to run tests, you'll need charm-tools installed (in addition to
juju, of course):
sudo add-apt-repository ppa:juju/stable

20
tests/tests.yaml Normal file
View File

@ -0,0 +1,20 @@
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-neutronclient
- python-novaclient
- python-pika
- python-swiftclient