neutron-vpnaas/tools
Paul Michali d7f65a2dbc VPNaaS: Revise functional test hooks
This commit does several things to allow functional tests to run, using a
DevStack configuration, but without stacking.

First, the gate_hook.sh is modified to specified environment variables
needed for processing, and will call configure_vpn_for_func_testing.sh.

The new configure_for_vpn_func_testing.sh script will first call the Neutron
configure_for_func_testing.sh script (as modified in [1]) to setup DevStack.
The script then installs the IPSec package, based on the functional job, and
will create the vpn_agent.ini file, in case it is needed for tests.

Minor changes are made to the post-test_hook.sh to indicate the location for
the Neutron and VPN repos.

Lastly, tox.ini is modified to place the rootwrap related files into the
virtual environment, copy in the VPN rootwrap filter, set up the rootwrap
commands, and copy the (customized) rootwrap.conf to /etc/neutron.

This last step is needed, because the neutron-vpn-netns-wrapper script that
is (currently) used for StrongSwan, uses /etc/neutron/rootwrap.conf and
doesn't allow overriding. This copying is a simple approach that will work
when multiple functional jobs are running, as the same config is used.

As a future follow-up commit, we could look into modifying the VPN device
drivers to pass the full path to the rootwrap.conf as a argument to the
neutron-vpn-netns-wrapper script (--rootwrap_config). The setting could
be added to the vpnagent.ini config file, available via config, to allow
this to be customized to something other than /etc/neutron (for production
use), and the functional tests could override it to point to the right
virtual environment.

To configure the environment for local run of the functional test, one
can do:
    tools/configure_for_vpn_func_testing.sh <devstack-repo> [-i]

where:
   devstack-repo... Path to devstack repo (/opt/stack/new/devstack
                    when run by gate)
   -i.............. Indicates to install Neutron package dependencies

For StrongSwan, prefix the command with VENV=dsvm-functional-sswan

Ref: [1] https://review.openstack.org/#/c/176064/

Change-Id: I2243b06b3cdbb352dac7bc47d03c830efb87be3c
Closes-Bug: #1445052
Depends-On: Ie490e89c1a65e126ad0a57d062076e472762837e
2015-05-15 13:37:19 -04:00
..
check_i18n_test_case.txt Add script for checking i18n message 2012-12-10 17:29:54 +08:00
check_i18n.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
check_unit_test_structure.sh VPNaaS: Reorganize test tree 2015-04-07 15:57:19 +00:00
clean.sh VPNaaS: Remove check for bash usage 2015-04-07 16:18:04 +00:00
configure_for_vpn_func_testing.sh VPNaaS: Revise functional test hooks 2015-05-15 13:37:19 -04:00
i18n_cfg.py Fix message i18n error 2013-09-08 15:58:12 +08:00
install_venv_common.py Split vpnaas services code into neutron-vpnaas 2014-12-08 13:37:08 -07:00
install_venv.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
pretty_tox.sh Migrate to oslo.concurrency 2015-01-14 17:58:09 +01:00
subunit-trace.py Show progress output while running unit tests 2014-11-20 21:05:32 +00:00
with_venv.sh VPNaaS: Remove check for bash usage 2015-04-07 16:18:04 +00:00