Document how to run functional test locally
Closes-Bug: #1513289 Change-Id: Id9fb51b886fb525f5e47be33c1b840473ced2d52
This commit is contained in:
parent
d90bc0ef7d
commit
fed823f82a
|
@ -0,0 +1,57 @@
|
||||||
|
===========================
|
||||||
|
Run functional test locally
|
||||||
|
===========================
|
||||||
|
|
||||||
|
This is a guide for developers who want to run functional tests in their local
|
||||||
|
machine.
|
||||||
|
|
||||||
|
Prerequisite
|
||||||
|
============
|
||||||
|
|
||||||
|
You need to follow the developer quickstart guide to deploy Magnum in a
|
||||||
|
devstack environment
|
||||||
|
|
||||||
|
`<http://docs.openstack.org/developer/magnum/dev/dev-quickstart.html>`_
|
||||||
|
|
||||||
|
Preparation
|
||||||
|
===========
|
||||||
|
|
||||||
|
Navigate to Magnum directory::
|
||||||
|
|
||||||
|
cd /opt/stack/magnum
|
||||||
|
|
||||||
|
Prepare a config file for functional test::
|
||||||
|
|
||||||
|
cp functional_creds.conf.sample functional_creds.conf
|
||||||
|
|
||||||
|
# update the IP address
|
||||||
|
HOST=$(cat /etc/magnum/magnum.conf | awk '/^host = /{print $3}')
|
||||||
|
sed -i "s/127.0.0.1/$HOST/" functional_creds.conf
|
||||||
|
|
||||||
|
# update admin password
|
||||||
|
source /opt/stack/devstack/openrc admin admin
|
||||||
|
iniset functional_creds.conf admin pass $OS_PASSWORD
|
||||||
|
|
||||||
|
# update demo password
|
||||||
|
source /opt/stack/devstack/openrc demo demo
|
||||||
|
iniset functional_creds.conf auth password $OS_PASSWORD
|
||||||
|
|
||||||
|
Create the necessary keypair and flavor::
|
||||||
|
|
||||||
|
source /opt/stack/devstack/openrc admin admin
|
||||||
|
nova keypair-add --pub-key ~/.ssh/id_rsa.pub default
|
||||||
|
nova flavor-create m1.magnum 100 2048 8 1
|
||||||
|
|
||||||
|
source /opt/stack/devstack/openrc demo demo
|
||||||
|
nova keypair-add --pub-key ~/.ssh/id_rsa.pub default
|
||||||
|
|
||||||
|
Install required packages::
|
||||||
|
|
||||||
|
sudo pip install -U -r test-requirements.txt
|
||||||
|
|
||||||
|
Run the test
|
||||||
|
============
|
||||||
|
|
||||||
|
Run this command::
|
||||||
|
|
||||||
|
tox -e functional -- --concurrency=1
|
|
@ -80,6 +80,7 @@ Developer Info
|
||||||
dev/dev-build-atomic-image.rst
|
dev/dev-build-atomic-image.rst
|
||||||
dev/dev-kubernetes-load-balancer.rst
|
dev/dev-kubernetes-load-balancer.rst
|
||||||
dev/dev-tls.rst
|
dev/dev-tls.rst
|
||||||
|
dev/dev-functional-test.rst
|
||||||
contributing
|
contributing
|
||||||
heat-templates
|
heat-templates
|
||||||
objects
|
objects
|
||||||
|
|
|
@ -9,7 +9,7 @@ auth_version = v2
|
||||||
[admin]
|
[admin]
|
||||||
user = admin
|
user = admin
|
||||||
tenant = admin
|
tenant = admin
|
||||||
pass = secrete
|
pass = password
|
||||||
[magnum]
|
[magnum]
|
||||||
image_id = fedora-21-atomic-5
|
image_id = fedora-21-atomic-5
|
||||||
nic_id = public
|
nic_id = public
|
||||||
|
|
Loading…
Reference in New Issue