testing: Make TNC scenarios agnostic to the actual Debian version

The scenarios will work with new or old base images as long as the version
in use is included as product in the master data (src/libimcv/imv/data.sql).
This commit is contained in:
Tobias Brunner
2014-10-07 12:18:25 +02:00
parent 93fac61da5
commit 8f9016b1e2
18 changed files with 52 additions and 45 deletions
@@ -1,10 +1,10 @@
/* Devices */
INSERT INTO devices ( /* 1 */
value, product, created
) VALUES (
'aabbccddeeff11223344556677889900', 42, 1372330615
);
value, product, created
)
SELECT 'aabbccddeeff11223344556677889900', id, 1372330615
FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
/* Groups Members */
@@ -26,9 +26,9 @@ INSERT INTO identities (
INSERT INTO sessions (
time, connection, identity, device, product, rec
) VALUES (
NOW, 1, 1, 1, 42, 0
);
)
SELECT NOW, 1, 1, 1, id, 0
FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
/* Results */
@@ -7,6 +7,7 @@ dave::cat /etc/tnc_config
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
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::/var/www/tnc/manage.py setpassword strongSwan strongSwan