testing: Reduce runtime of all tests that use SQLite databases by storing them in ramfs
This commit is contained in:
@@ -5,7 +5,7 @@ DEBUG_TOOLBAR=0
|
||||
|
||||
[db]
|
||||
DJANGO_DB_URL=sqlite:////var/www/tnc/django.db
|
||||
STRONGTNC_DB_URL = sqlite:////etc/pts/config.db
|
||||
STRONGTNC_DB_URL = sqlite:////etc/db.d/config.db
|
||||
|
||||
[localization]
|
||||
LANGUAGE_CODE=en-us
|
||||
|
||||
@@ -24,7 +24,7 @@ charon {
|
||||
|
||||
libimcv {
|
||||
debug_level = 3
|
||||
database = sqlite:///etc/pts/config.db
|
||||
database = sqlite:///etc/db.d/config.db
|
||||
policy_script = ipsec imv_policy_manager
|
||||
|
||||
plugins {
|
||||
|
||||
@@ -3,7 +3,6 @@ carol::ipsec stop
|
||||
dave::ipsec stop
|
||||
alice::ipsec stop
|
||||
alice::service apache2 stop
|
||||
alice::umount /etc/pts
|
||||
moon::iptables-restore < /etc/iptables.flush
|
||||
carol::iptables-restore < /etc/iptables.flush
|
||||
dave::iptables-restore < /etc/iptables.flush
|
||||
|
||||
@@ -6,13 +6,10 @@ 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 -R www-data /etc/pts; chmod -R g+w /etc/pts
|
||||
alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/db.d/config.db
|
||||
alice::chgrp -R www-data /etc/db.d/config.db; chmod -R g+w /etc/db.d/config.db
|
||||
alice::/var/www/tnc/manage.py setpassword strongSwan strongSwan
|
||||
alice::service apache2 start
|
||||
alice::ipsec start
|
||||
|
||||
@@ -20,7 +20,7 @@ TCPDUMPHOSTS="moon"
|
||||
#
|
||||
IPSECHOSTS="moon carol dave alice"
|
||||
|
||||
# Guest instances on which FreeRadius is started
|
||||
# Guest instances on which databases are used
|
||||
#
|
||||
RADIUSHOSTS=
|
||||
DBHOSTS="alice"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user