Jump to: navigation, search

Difference between revisions of "MagnetoDB/QA/Tests on env with devstack"

(Environment Creation)
(Environment Creation)
 
(9 intermediate revisions by 3 users not shown)
Line 9: Line 9:
 
</pre>
 
</pre>
  
2. Clone [https://github.com/stackforge/magnetodb.git MagnetoDB]
+
2. Integrate MagnetoDB with DevStack.
<pre>
 
$ git clone https://github.com/stackforge/magnetodb.git
 
</pre>
 
 
 
3. Integrate MagnetoDB with DevStack.
 
 
To install:
 
To install:
 
<pre>
 
<pre>
 
$ DEVSTACK_DIR=.../path/to/devstack
 
$ DEVSTACK_DIR=.../path/to/devstack
$ cp magnetodb/contrib/devstack/lib/magnetodb ${DEVSTACK_DIR}/lib
+
$ echo "enable_plugin magnetodb https://git.openstack.org/stackforge/magnetodb" >> local.conf
$ cp magnetodb/contrib/devstack/extras.d/90-magnetodb.sh ${DEVSTACK_DIR}/extras.d
 
 
</pre>
 
</pre>
 
+
To configure devstack to run MagnetoDB with functional testing:
To configure devstack to run MagnetoDB:
 
 
<pre>
 
<pre>
 
$ cd ${DEVSTACK_DIR}
 
$ cd ${DEVSTACK_DIR}
$ echo "enable_service magnetodb" >> local.conf
+
$ echo "enable_service tempest" >> local.conf
 
</pre>
 
</pre>
  
Line 34: Line 27:
  
 
'''Note:'''  
 
'''Note:'''  
Make sure that your local.conf contains <nowiki>[[local | localrc]]</nowiki> in the first line. See more about configuration of DevStack at http://devstack.org/configuration.html Also you can change other Magnetodb variables, see file lib/magnetodb
+
Make sure that your local.conf contains <nowiki>[[local | localrc]]</nowiki> in the first line. See more about configuration of DevStack at http://devstack.org/configuration.html Also you can change other MagnetoDB variables, see file lib/magnetodb
  
 
4. Make sure magnetodb-server-api started
 
4. Make sure magnetodb-server-api started
Line 43: Line 36:
 
5. Change current directory to magnetodb
 
5. Change current directory to magnetodb
 
<pre>
 
<pre>
$ cd magnetodb
+
$ cd /opt/stack/magnetodb
 
</pre>
 
</pre>
  
Line 53: Line 46:
 
<pre>
 
<pre>
 
$ tox
 
$ tox
 +
</pre>
 +
 +
 +
==== Tempest functional/integration tests ====
 +
 +
* change directory to tempest
 +
<pre>
 +
$ cd /opt/stack/tempest
 
</pre>
 
</pre>
  
 
* to start '''''stable''''' tempest tests (this folder contains scenarios that verify already implemented functionality):
 
* to start '''''stable''''' tempest tests (this folder contains scenarios that verify already implemented functionality):
 
<pre>
 
<pre>
$ tox -e tempest-stable
+
$ tox -e magnetodb-stable
 
</pre>
 
</pre>
  
 
* to start '''''in_progress''''' tempest tests (contains scenarios that are in progress (i.e. is being worked on) or the functionality that is a subject to changes (minor additions, refactoring, debugging)):
 
* to start '''''in_progress''''' tempest tests (contains scenarios that are in progress (i.e. is being worked on) or the functionality that is a subject to changes (minor additions, refactoring, debugging)):
 
<pre>
 
<pre>
$ tox -e tempest-in-progress
+
$ tox -e magnetodb-in-progress
 
</pre>
 
</pre>
  
 
* to start '''''not_ready''''' tempest tests (dedicated to the test scenarios that were created, but the appropriate functionality is not ready yet (not implemented or partially implemented)):
 
* to start '''''not_ready''''' tempest tests (dedicated to the test scenarios that were created, but the appropriate functionality is not ready yet (not implemented or partially implemented)):
 
<pre>
 
<pre>
$ tox -e tempest-not-ready
+
$ tox -e magnetodb-not-ready
 
</pre>
 
</pre>
 
<br />
 
<br />
 
'''Note:''' Each group of tests run in individual venv and will require some time to install dependencies (Python packages)
 
'''Note:''' Each group of tests run in individual venv and will require some time to install dependencies (Python packages)

Latest revision as of 09:51, 20 July 2015

Tests on environment with DevStack

The easiest way to build a fully functional development environment is with DevStack. Create a machine (such as a VM or Vagrant box) running a distribution supported by DevStack and install DevStack there.

Environment Creation

1. Clone DevStack

$ git clone https://github.com/openstack-dev/devstack.git

2. Integrate MagnetoDB with DevStack. To install:

$ DEVSTACK_DIR=.../path/to/devstack
$ echo "enable_plugin magnetodb https://git.openstack.org/stackforge/magnetodb" >> local.conf

To configure devstack to run MagnetoDB with functional testing:

$ cd ${DEVSTACK_DIR}
$ echo "enable_service tempest" >> local.conf

Run DevStack as normal:

$ ./stack.sh

Note: Make sure that your local.conf contains [[local | localrc]] in the first line. See more about configuration of DevStack at http://devstack.org/configuration.html Also you can change other MagnetoDB variables, see file lib/magnetodb

4. Make sure magnetodb-server-api started

$ ps aux | grep magnetodb

5. Change current directory to magnetodb

$ cd /opt/stack/magnetodb

Tests Running

6. Run tox with necessary parameters:

  • to start unit tests:
$ tox


Tempest functional/integration tests

  • change directory to tempest
$ cd /opt/stack/tempest
  • to start stable tempest tests (this folder contains scenarios that verify already implemented functionality):
$ tox -e magnetodb-stable
  • to start in_progress tempest tests (contains scenarios that are in progress (i.e. is being worked on) or the functionality that is a subject to changes (minor additions, refactoring, debugging)):
$ tox -e magnetodb-in-progress
  • to start not_ready tempest tests (dedicated to the test scenarios that were created, but the appropriate functionality is not ready yet (not implemented or partially implemented)):
$ tox -e magnetodb-not-ready


Note: Each group of tests run in individual venv and will require some time to install dependencies (Python packages)