diff options
author | varac <varacanero@zeromail.org> | 2013-08-29 17:11:17 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-08-29 17:11:17 +0200 |
commit | 7599fc6cf78ad274b7432228f5125e595cc57e31 (patch) | |
tree | 54f0cb455cf088dcb3422bdb9cbf7a3c827534e0 | |
parent | fe68c294b646dfdec0bad4e7823b9f412df01660 (diff) |
added leap-mx test scripts
-rwxr-xr-x[-rw-r--r--] | superproject-post-push.sh | 0 | ||||
-rwxr-xr-x | test-postmap.sh | 17 | ||||
-rwxr-xr-x | test-swaks.sh | 40 |
3 files changed, 57 insertions, 0 deletions
diff --git a/superproject-post-push.sh b/superproject-post-push.sh index d680a94..d680a94 100644..100755 --- a/superproject-post-push.sh +++ b/superproject-post-push.sh diff --git a/test-postmap.sh b/test-postmap.sh new file mode 100755 index 0000000..ceee206 --- /dev/null +++ b/test-postmap.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +test_postmap () { + echo -n "get $1, port 2244:" + postmap -v -q $1 tcp:localhost:2244 2>&1 |grep recv: + echo -n "get $1, port 4242:" + postmap -v -q $1 tcp:localhost:4242 2>&1 |grep recv: + echo +} + +test_postmap dummy +test_postmap dummy@dev.bitmask.net +test_postmap dummy@nowhe.re + +test_postmap nobody +test_postmap nobody@dev.bitmask.net +test_postmap nobody@nowhe.re diff --git a/test-swaks.sh b/test-swaks.sh new file mode 100755 index 0000000..78c6cb4 --- /dev/null +++ b/test-swaks.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +local='dummy@dev.bitmask.net' +nobody_local='fooooooo@dev.bitmask.net' +external='dummy@zeromail.org' + +swaks_options='--server localhost --tls --hide-informational --suppress-data' +swaks_auth='--tls-cert /root/cert.crt --tls-key /root/cert.key' + +test_swaks() { + from=$1 + to=$2 + + echo -n "From $from, to $to, no authentication:" + swaks -f $from -t $to $swaks_options | tail -3 | head -1 + + echo -n "From $from, to $to, with authentication:" + swaks -f $from -t $to $swaks_options $swaks_auth | tail -3 | head -1 + echo +} + +test_swaks $local $local +test_swaks $local $nobody_local +test_swaks $local $external + +echo + +test_swaks $nobody_local $local +test_swaks $nobody_local $nobody_local +test_swaks $nobody_local $external + +echo + +test_swaks $external $local +test_swaks $external $nobody_local +test_swaks $external $external + + + + |