Writing Tests

From Libreswan
Jump to navigation Jump to search

Please see Test_Suite

Please see Test_Suite

Quick guide and rules for Libresan tests, how to create one

basic test

A basic test has two or three hosts. Typically east is the IKE responder, and west, road, or north is the initiator.

Most simple test is with two hosts, just east and west.

advanced test

00-<host>-*.sh 


Forbidden lines/commands in tests

empty lines

test scripts should not have any empty lines.

killall -9 pluto

rather any killall would interfear in namespace testing. If you run "killall -9 pluto" in a test script it will terminate all plutos, including the ones on host, other tests..

kill -9 -p $(cat /run/pluto/pluto.pid)