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:
		
							
								
								
									
										16
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								Makefile
									
									
									
									
									
								
							@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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
									
								
							
							
						
						
									
										0
									
								
								tests/010-basic-precise-essex
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										0
									
								
								tests/017-basic-trusty-kilo
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								tests/017-basic-trusty-kilo
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										0
									
								
								tests/019-basic-vivid-kilo
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								tests/019-basic-vivid-kilo
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
								
								
									
										11
									
								
								tests/020-basic-trusty-liberty
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								tests/020-basic-trusty-liberty
									
									
									
									
									
										Normal 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()
 | 
			
		||||
							
								
								
									
										9
									
								
								tests/021-basic-wily-liberty
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tests/021-basic-wily-liberty
									
									
									
									
									
										Normal 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()
 | 
			
		||||
							
								
								
									
										10
									
								
								tests/README
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								tests/README
									
									
									
									
									
								
							@@ -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
									
								
							
							
						
						
									
										20
									
								
								tests/tests.yaml
									
									
									
									
									
										Normal 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
 | 
			
		||||
		Reference in New Issue
	
	Block a user