strongswan/testing
Reto Buerki 8484f2bc5c Implement multiple-clients integration test
Two transport connections to gateway sun are set up, one from client
carol and the other from client dave. The gateway sun uses the Trusted
Key Manager (TKM) and is the responder for both connections. The
authentication is based on X.509 certificates. In order to test the
connections, both carol and dave ping gateway sun.
2013-03-19 15:23:51 +01:00
..
config testing: Rename interfaces and bridges so they are easier to identify 2013-03-19 11:50:39 +01:00
hosts Add expect-file guest image script 2013-03-19 15:23:50 +01:00
images Remove executable flag from source files. 2012-05-18 10:04:08 +02:00
scripts Provide script to build Ada XFRM proxy 2013-03-19 15:23:50 +01:00
tests Implement multiple-clients integration test 2013-03-19 15:23:51 +01:00
.gitignore added .gitignore files, ready for the switch 2009-04-30 07:42:30 +00:00
Makefile.am Removed INSTALL from EXTRA_DIST 2013-01-17 23:20:37 +01:00
README Updated documentation for the integration tests 2013-01-17 16:56:02 +01:00
do-tests Renamed $UMLHOSTS to $VIRTHOSTS 2013-01-17 16:56:02 +01:00
make-testing Switch to 'mapped' access mode for hostfs 2013-01-17 16:55:04 +01:00
ssh testing: Enable ssh connection to second IP by name (e.g. moon1) 2013-03-05 17:40:13 +01:00
ssh_config Use key(and password-)less SSH authentication 2013-01-17 15:22:09 +01:00
start-testing testing: Rename interfaces and bridges so they are easier to identify 2013-03-19 11:50:39 +01:00
stop-testing Make guest ACPI shutdown work 2013-01-17 16:55:03 +01:00
testing.conf upgraded KVM test suite to Linux 3.8 kernel 2013-03-03 11:59:07 +01:00

README

                 ------------------------------
                  strongSwan Integration Tests
                 ------------------------------


Contents
--------

   1. Building the testing environment
   2. Starting up the testing environment
   3. Running the automated tests
   4. Manual testing


1. Building the testing environment
   --------------------------------

The testing environment can be built with the "make-testing" script after
adjusting the variables in the testing.conf file.  By default everything is
built when executing the script.  Setting any of the ENABLE_BUILD_* variables
in the configuration file to "no" will not build those parts.


2. Starting up the testing environment
   -----------------------------------

When the strongSwan testing environment has been put into place by running
the "make-testing" script you are ready to start up the KVM instances by
executing the "start-testing" script.


3. Running the automated tests
   ---------------------------

The script

    ./do-tests <testnames>

runs the automated tests.  If the <testnames> argument is omitted all tests
are executed, otherwise only the tests listed will be run as shown in the
example below:

    ./do-tests ikev2/net2net-psk ikev2/net2net-cert

Each test is divided into the following phases:

    * Load the test-specific guest configuration if any is provided.

    * Next the "pretest.dat" script found in each test directory is executed.
      Among other commands, strongSwan is started on the IPsec hosts.

    * The "evaltest.dat" script evaluates if the test has been successful.

    * The "posttest.dat" script terminates the test e.g. by stopping
      strongSwan on the IPsec hosts.  It is also responsible to cleaning up
      things (e.g. firewall rules) set up in "pretest.dat".

    * Restore the default configuration on every host (new files have to be
      deleted manually in "posttest.dat").

The test results and configuration files for all tests are stored in a
folder labeled with the current date and time in the $TESTRESULTSDIR directory.

The same results are also automatically transferred to the Apache server
running on guest "winnetou" and can be accessed via the URL

    http://192.168.0.150/testresults/


4. Manual testing
   --------------

Instead of running tests automatically with "do-tests" it is possible to
preload a test scenario with the script:

    scripts/load-testconfig <testname>

Individual configuration files can be changed and any command can be executed by
logging into a guest host directly (via SSH or a console window).  No password
is required to login as root.  The sources for every software built during
"make-testing" are mounted at /root/shared/, which allows you to change and
recompile these components.

After you have finished testing, the default configuration can be restored
with the following command (newly created files have to be deleted manually)

    scripts/restore-defaults