This repositroy contains Openstack tests based python3.
You need to install the requirements.
$> pip3 install -r requirements.txt
or with pip.
$> pip3 install git+https://github.com/deNBI/OpenStackTests@master
or
$> pip3 install git+https://github.com/deNBI/OpenStackTests@dev
Before you can start the tests you have to set some configurations.
All tests require the config.yml. The more complex tests also require the complex_test.yml
There are some basic tests:
The endpont_test sends an HTTP OPTIONS request to a specific Url of a service like glance. If the returning status code is not equal than 5xx, the test was successful You can see all avaiable services with the command:
$> python3 endpoint_test.py --help
also if you would want to test all avaiable endpoints one after the other you can just use:
$> python3 endpoint_test.py
if you want to test one specific endpoint use:
$> python3 endpoint_test.py glance
The create_and_delete_image test goes through the following steps:
- Downloads the actual cirros image
- Uploads the cirros image
- Deletes the image
If the image was uploaded and deleted without errors the test was succesfull
The complex test needs beside the config.yml also the complex_test.yml
The complex_test.py goes through the following steps::
- Creates a network,subnet and a router connected to a specific network
- Start an instance using the default image(cirros)
- Assign a floating ip to the instance
- Login into the instance and try connect to google
- Logout
- Stop and Delete the Instance
- Delete network, subnet and route