Jump to: navigation, search

Difference between revisions of "Trove/integration-testing"

m (on instance create added flavor arguments)
(Testing with Reddwarf and Redstack)
Line 17: Line 17:
 
This runs all the black-box tests by default. You can run a different group of tests by using the group parameter.
 
This runs all the black-box tests by default. You can run a different group of tests by using the group parameter.
 
* You can run the simple tests by: $ ~/reddwarf-integration/scripts/redstack int-tests --group simple
 
* You can run the simple tests by: $ ~/reddwarf-integration/scripts/redstack int-tests --group simple
 +
 +
=== Cheat Code Test Environment Variables ===
 +
If you have an instance you created by hand and want to use it with the tests you can use an ''''''environment variable'''''' cheat code to use it in the tests.
 +
* TESTS_DO_NOT_DELETE_INSTANCE - Does not delete the instance at the end of the tests. This is helpful for debugging the instance or rerunning tests with the same instance multiple times.
 +
* TESTS_USE_INSTANCE_ID - Instead of creating a new instance for the tests it uses this instance. Useful if you have an instance and want the tests to run faster.
 +
 +
 +
Usage:
 +
 +
$ TESTS_DO_NOT_DELETE_INSTANCE=True TESTS_USE_INSTANCE_ID=INSTANCE_UUID ~/reddwarf-integration/scripts/redstack int-tests

Revision as of 14:53, 20 June 2013

Testing with Reddwarf and Redstack

In order to fix network access issues for guest instances in Devstack, run:

$ sudo iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE

Once you have this up and running, you can use redstack's interfaces into nova-client and python-reddwarfclient to interact with Nova and Reddwarf.

  • $ ~/reddwarf-integration/scripts/redstack nova-client list
  • $ ~/reddwarf-integration/scripts/redstack rd-client instance list
  • $ ~/reddwarf-integration/scripts/redstack rd-client instance create --name test --size 2 --flavor 2

You can run the tests by:

$ ~/reddwarf-integration/scripts/redstack int-tests

This runs all the black-box tests by default. You can run a different group of tests by using the group parameter.

  • You can run the simple tests by: $ ~/reddwarf-integration/scripts/redstack int-tests --group simple

Cheat Code Test Environment Variables

If you have an instance you created by hand and want to use it with the tests you can use an 'environment variable' cheat code to use it in the tests.

  • TESTS_DO_NOT_DELETE_INSTANCE - Does not delete the instance at the end of the tests. This is helpful for debugging the instance or rerunning tests with the same instance multiple times.
  • TESTS_USE_INSTANCE_ID - Instead of creating a new instance for the tests it uses this instance. Useful if you have an instance and want the tests to run faster.


Usage:

$ TESTS_DO_NOT_DELETE_INSTANCE=True TESTS_USE_INSTANCE_ID=INSTANCE_UUID ~/reddwarf-integration/scripts/redstack int-tests