strongswan/testing
Tobias Brunner 19611b1d28 testing: Build wolfSSL from the Git repository
Use the same configure options etc. for both builds (no need for the cert
options as we don't use TLS or X.509 parsing) and switch to a Git commit
that includes the SHA-3 OID fix (it's actually the fix itself).
2021-06-22 17:54:15 +02:00
..
config Version bump to 5.9.3dr2 2021-05-21 10:00:41 +02:00
hosts testing: Add scenarios that use a CA with two intermediate CA certificates 2021-01-11 15:28:10 +01:00
images Remove executable flag from source files. 2012-05-18 10:04:08 +02:00
scripts testing: Build wolfSSL from the Git repository 2021-06-22 17:54:15 +02:00
tests testing: Fixed ikev2/farp scenario 2021-06-22 12:32:35 +02:00
.gitignore testing: Ignore tests/local directory 2016-06-29 10:36:10 +02:00
Makefile.am testing: Exclude files that are ignored in Git from the distribution 2019-05-08 14:56:48 +02:00
README Updated documentation for the integration tests 2013-01-17 16:56:02 +01:00
do-tests testing: Skip tests with missing files, don't abort the test run 2020-06-23 16:24:18 +02:00
make-testing testing: Build certificates when make-testing is called 2020-09-30 12:52:43 +02:00
ssh Define SSHCONF from strongswan testing directory, not TESTDIR 2013-03-26 10:31:29 +01:00
ssh_config Version bump to 5.7.1 2018-10-01 17:46:17 +02:00
start-testing testing: Replace kvm with qemu-system-x86_64 2021-05-10 11:14:00 +02:00
stop-testing testing: Ignore hosts that are not running during shutdown 2020-10-29 10:22:51 +01:00
testing.conf Version bump to 5.9.3dr4 2021-06-22 10:33:07 +02: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