Amend documentation for fullstack tests
When trying to execute the fullstack tests, I was a little bit lost in the documentation. This change is a proposal to refactor this a little bit so the only source of truth is the doc/source/contributor/testing/fullstack.rst file. Change-Id: Ibaf2ab9a227d71d18adf027d2ae509168c1e26da Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
This commit is contained in:
parent
2b518af0ab
commit
c7cd387796
54
TESTING.rst
54
TESTING.rst
@ -512,59 +512,7 @@ to deploy Neutron to the target host.
|
|||||||
Fullstack Tests
|
Fullstack Tests
|
||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
To run all the fullstack tests, you may use: ::
|
See :ref:`FullStack Testing<fullstack_testing>` guide.
|
||||||
|
|
||||||
tox -e dsvm-fullstack
|
|
||||||
|
|
||||||
Since fullstack tests often require the same resources and
|
|
||||||
dependencies as the functional tests, using the configuration script
|
|
||||||
tools/configure_for_func_testing.sh is advised (as described above).
|
|
||||||
Before running the script, you must first set the following environment
|
|
||||||
variable so things are setup correctly ::
|
|
||||||
|
|
||||||
export VENV=dsvm-fullstack
|
|
||||||
|
|
||||||
When running fullstack tests on a clean VM for the first time, it is
|
|
||||||
important to make sure all of Neutron's package dependencies have been met.
|
|
||||||
As mentioned in the functional test section above, this can be done by
|
|
||||||
running the configure script with the '-i' argument ::
|
|
||||||
|
|
||||||
./tools/configure_for_func_testing.sh ../devstack -i
|
|
||||||
|
|
||||||
You can also run './stack.sh', and if successful, it will have also
|
|
||||||
verified the package dependencies have been met.
|
|
||||||
When running on a new VM it is suggested to set the following environment
|
|
||||||
variable as well, to make sure that all requirements (including database and
|
|
||||||
message bus) are installed and set ::
|
|
||||||
|
|
||||||
export IS_GATE=False
|
|
||||||
|
|
||||||
Fullstack-based Neutron daemons produce logs to a sub-folder in the
|
|
||||||
$OS_LOG_PATH directory (default: /opt/stack/logs, note: if running fullstack
|
|
||||||
tests on a newly created VM, make sure that $OS_LOG_PATH exists with the
|
|
||||||
correct permissions) called 'dsvm-fullstack-logs'.
|
|
||||||
For example, a test named "test_example" will produce logs in
|
|
||||||
$OS_LOG_PATH/dsvm-fullstack-logs/test_example/, as well as create
|
|
||||||
$OS_LOG_PATH/dsvm-fullstack-logs/test_example.txt, so that is a good place
|
|
||||||
to look if your test is failing.
|
|
||||||
|
|
||||||
The fullstack test suite assumes 240.0.0.0/4 (Class E) range in the root
|
|
||||||
namespace of the test machine is available for its usage.
|
|
||||||
|
|
||||||
Fullstack tests execute a custom dhclient-script. From kernel version 4.14 onward,
|
|
||||||
apparmor on certain distros could deny the execution of this script. To be sure,
|
|
||||||
check journalctl ::
|
|
||||||
|
|
||||||
sudo journalctl | grep DENIED | grep fullstack-dhclient-script
|
|
||||||
|
|
||||||
To execute these tests, the easiest workaround is to disable apparmor ::
|
|
||||||
|
|
||||||
sudo systemctl stop apparmor
|
|
||||||
sudo systemctl disable apparmor
|
|
||||||
|
|
||||||
A more granular solution could be to disable apparmor only for dhclient ::
|
|
||||||
|
|
||||||
sudo ln -s /etc/apparmor.d/sbin.dhclient /etc/apparmor.d/disable/
|
|
||||||
|
|
||||||
API & Scenario Tests
|
API & Scenario Tests
|
||||||
~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -108,11 +108,15 @@ How to run fullstack tests locally?
|
|||||||
|
|
||||||
Fullstack tests can be run locally. That makes it much easier to understand
|
Fullstack tests can be run locally. That makes it much easier to understand
|
||||||
exactly how it works, debug issues in the existing tests or write new ones.
|
exactly how it works, debug issues in the existing tests or write new ones.
|
||||||
To run fullstack tests locally, you should clone
|
To run fullstack tests locally, you should clone the following repositories:
|
||||||
`Devstack <https://opendev.org/openstack/devstack/>` and `Neutron
|
|
||||||
<https://opendev.org/openstack/neutron>` repositories. When repositories are
|
* `Devstack <https://opendev.org/openstack/devstack/>`
|
||||||
available locally, the first thing which needs to be done is preparation of the
|
* `Neutron <https://opendev.org/openstack/neutron>`
|
||||||
environment. There is a simple script in Neutron to do that.
|
* `Requirements <https://opendev.org/openstack/requirements>`
|
||||||
|
|
||||||
|
When repositories are available locally, the first thing which needs to be
|
||||||
|
done is preparation of the environment. There is a simple script in Neutron
|
||||||
|
to do that:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
@ -127,8 +131,24 @@ done you should see a message like:
|
|||||||
Phew, we're done!
|
Phew, we're done!
|
||||||
|
|
||||||
That means that all went well and you should be ready to run fullstack tests
|
That means that all went well and you should be ready to run fullstack tests
|
||||||
locally. Of course there are many tests there and running all of them can
|
locally.
|
||||||
take a pretty long time so lets try to run just one:
|
|
||||||
|
Fullstack tests execute a custom dhclient-script. From kernel version 4.14 onward,
|
||||||
|
apparmor on certain distros could deny the execution of this script. To be sure,
|
||||||
|
check journalctl ::
|
||||||
|
|
||||||
|
sudo journalctl | grep DENIED | grep fullstack-dhclient-script
|
||||||
|
|
||||||
|
To execute these tests, the easiest workaround is to disable apparmor ::
|
||||||
|
|
||||||
|
sudo systemctl stop apparmor
|
||||||
|
sudo systemctl disable apparmor
|
||||||
|
|
||||||
|
A more granular solution could be to disable apparmor only for dhclient ::
|
||||||
|
|
||||||
|
sudo ln -s /etc/apparmor.d/sbin.dhclient /etc/apparmor.d/disable/
|
||||||
|
|
||||||
|
Now that your environment is ready for tests, you can try to run just one:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user