testing: Improve runtime of TNC tests by storing the SQLite DB in ramfs
This saves about 50%-70% of the time needed for scenarios that use a DB.
This commit is contained in:
@@ -3,7 +3,7 @@ carol::ipsec stop
|
||||
dave::ipsec stop
|
||||
alice::killall radiusd
|
||||
alice::rm /etc/freeradius/sites-enabled/inner-tunnel-second
|
||||
alice::rm /etc/pts/config.db
|
||||
alice::umount /etc/pts
|
||||
carol::echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
moon::iptables-restore < /etc/iptables.flush
|
||||
carol::iptables-restore < /etc/iptables.flush
|
||||
|
||||
@@ -5,6 +5,9 @@ carol::echo 0 > /proc/sys/net/ipv4/ip_forward
|
||||
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
|
||||
alice::ln -s /etc/freeradius/sites-available/inner-tunnel-second /etc/freeradius/sites-enabled/inner-tunnel-second
|
||||
alice::cat /etc/freeradius/sites-enabled/inner-tunnel-second
|
||||
alice::mv /etc/pts/data1.sql /tmp/
|
||||
alice::mount -t ramfs -o size=5m ramfs /etc/pts
|
||||
alice::mv /tmp/data1.sql /etc/pts/
|
||||
alice::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
|
||||
alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
|
||||
alice::LEAK_DETECTIVE_DISABLE=1 LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties radiusd
|
||||
|
||||
@@ -5,4 +5,4 @@ moon::iptables-restore < /etc/iptables.flush
|
||||
carol::iptables-restore < /etc/iptables.flush
|
||||
dave::iptables-restore < /etc/iptables.flush
|
||||
carol::echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
moon::rm /etc/pts/config.db
|
||||
moon::umount /etc/pts
|
||||
|
||||
@@ -3,6 +3,9 @@ carol::iptables-restore < /etc/iptables.rules
|
||||
dave::iptables-restore < /etc/iptables.rules
|
||||
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
|
||||
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
|
||||
moon::mv /etc/pts/data1.sql /tmp/
|
||||
moon::mount -t ramfs -o size=5m ramfs /etc/pts
|
||||
moon::mv /tmp/data1.sql /etc/pts/
|
||||
moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
|
||||
moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
|
||||
moon::cat /etc/tnc_config
|
||||
|
||||
@@ -5,4 +5,4 @@ moon::iptables-restore < /etc/iptables.flush
|
||||
carol::iptables-restore < /etc/iptables.flush
|
||||
dave::iptables-restore < /etc/iptables.flush
|
||||
carol::echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
moon::rm /etc/pts/config.db
|
||||
moon::umount /etc/pts
|
||||
|
||||
@@ -3,6 +3,9 @@ carol::iptables-restore < /etc/iptables.rules
|
||||
dave::iptables-restore < /etc/iptables.rules
|
||||
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
|
||||
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
|
||||
moon::mv /etc/pts/data1.sql /tmp/
|
||||
moon::mount -t ramfs -o size=5m ramfs /etc/pts
|
||||
moon::mv /tmp/data1.sql /etc/pts/
|
||||
moon::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql
|
||||
moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
|
||||
moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
|
||||
|
||||
@@ -3,7 +3,7 @@ carol::ipsec stop
|
||||
dave::ipsec stop
|
||||
alice::ipsec stop
|
||||
alice::service apache2 stop
|
||||
alice::rm /etc/pts/config.db
|
||||
alice::umount /etc/pts
|
||||
moon::iptables-restore < /etc/iptables.flush
|
||||
carol::iptables-restore < /etc/iptables.flush
|
||||
dave::iptables-restore < /etc/iptables.flush
|
||||
|
||||
@@ -6,10 +6,13 @@ carol::cat /etc/tnc_config
|
||||
dave::cat /etc/tnc_config
|
||||
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
|
||||
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
|
||||
alice::mv /etc/pts/data1.sql /tmp/
|
||||
alice::mount -t ramfs -o size=5m ramfs /etc/pts
|
||||
alice::mv /tmp/data1.sql /etc/pts/
|
||||
alice::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql
|
||||
alice::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
|
||||
alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
|
||||
alice::chgrp www-data /etc/pts/config.db; chmod g+w /etc/pts/config.db
|
||||
alice::chgrp -R www-data /etc/pts; chmod -R g+w /etc/pts
|
||||
alice::/var/www/tnc/manage.py setpassword strongSwan strongSwan
|
||||
alice::service apache2 start
|
||||
alice::ipsec start
|
||||
|
||||
@@ -3,7 +3,7 @@ dave::ip route del 10.1.0.0/16 via 192.168.0.1
|
||||
winnetou::ip route del 10.1.0.0/16 via 192.168.0.1
|
||||
alice::ipsec stop
|
||||
alice::service apache2 stop
|
||||
alice::rm /etc/pts/config.db
|
||||
alice::umount /etc/pts
|
||||
alice::iptables-restore < /etc/iptables.flush
|
||||
carol::iptables-restore < /etc/iptables.flush
|
||||
dave::iptables-restore < /etc/iptables.flush
|
||||
|
||||
@@ -6,10 +6,13 @@ carol::cat /etc/tnc_config
|
||||
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
|
||||
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
|
||||
dave::cat /etc/tnc_config
|
||||
alice::mv /etc/pts/data1.sql /tmp/
|
||||
alice::mount -t ramfs -o size=5m ramfs /etc/pts
|
||||
alice::mv /tmp/data1.sql /etc/pts/
|
||||
alice::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql
|
||||
alice::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
|
||||
alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
|
||||
alice::chgrp www-data /etc/pts/config.db; chmod g+w /etc/pts/config.db
|
||||
alice::chgrp -R www-data /etc/pts; chmod -R g+w /etc/pts
|
||||
alice::/var/www/tnc/manage.py setpassword strongSwan strongSwan
|
||||
alice::service apache2 start
|
||||
alice::ipsec start
|
||||
|
||||
@@ -5,4 +5,4 @@ moon::iptables-restore < /etc/iptables.flush
|
||||
carol::iptables-restore < /etc/iptables.flush
|
||||
dave::iptables-restore < /etc/iptables.flush
|
||||
carol::echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
moon::rm /etc/pts/config.db
|
||||
moon::umount /etc/pts
|
||||
|
||||
@@ -3,6 +3,9 @@ carol::iptables-restore < /etc/iptables.rules
|
||||
dave::iptables-restore < /etc/iptables.rules
|
||||
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
|
||||
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
|
||||
moon::mv /etc/pts/data1.sql /tmp/
|
||||
moon::mount -t ramfs -o size=5m ramfs /etc/pts
|
||||
moon::mv /tmp/data1.sql /etc/pts/
|
||||
moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
|
||||
moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
|
||||
moon::cat /etc/tnc_config
|
||||
|
||||
@@ -5,4 +5,4 @@ moon::iptables-restore < /etc/iptables.flush
|
||||
carol::iptables-restore < /etc/iptables.flush
|
||||
dave::iptables-restore < /etc/iptables.flush
|
||||
carol::echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
moon::rm /etc/pts/config.db
|
||||
moon::umount /etc/pts
|
||||
|
||||
@@ -3,6 +3,9 @@ carol::iptables-restore < /etc/iptables.rules
|
||||
dave::iptables-restore < /etc/iptables.rules
|
||||
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
|
||||
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
|
||||
moon::mv /etc/pts/data1.sql /tmp/
|
||||
moon::mount -t ramfs -o size=5m ramfs /etc/pts
|
||||
moon::mv /tmp/data1.sql /etc/pts/
|
||||
moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
|
||||
moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
|
||||
moon::cat /etc/tnc_config
|
||||
|
||||
Reference in New Issue
Block a user