diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-07-28 20:33:26 +0100 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-07-29 15:17:19 +0100 |
commit | cb3a3c90501237a05f90d297ffb0a118e7f5eb66 (patch) | |
tree | 2a6c3793bcad69c83ff5261429080bedab7f6c81 /test/functional/cases | |
parent | 6c9b754334d8ae681828e6f4540d20cd19e41e87 (diff) | |
download | rspamd-cb3a3c90501237a05f90d297ffb0a118e7f5eb66.tar.gz rspamd-cb3a3c90501237a05f90d297ffb0a118e7f5eb66.zip |
[Test] Some minor fixes & improvements for tests
- Also machine-format test data again
Diffstat (limited to 'test/functional/cases')
-rw-r--r-- | test/functional/cases/102_maps.robot | 24 | ||||
-rw-r--r-- | test/functional/cases/103_password.robot | 21 |
2 files changed, 22 insertions, 23 deletions
diff --git a/test/functional/cases/102_maps.robot b/test/functional/cases/102_maps.robot index aecc61b5c..e391af99c 100644 --- a/test/functional/cases/102_maps.robot +++ b/test/functional/cases/102_maps.robot @@ -17,7 +17,7 @@ MAP - DNSBL HIT MAP - DNSBL MISS ${result} = Scan Message With Rspamc ${MESSAGE} -i 127.0.0.1 - Check Rspamc ${result} DNSBL_MAP inverse=1 rc_nocheck=1 + Check Rspamc ${result} DNSBL_MAP inverse=1 rc_noinverse=1 MAP - IP HIT ${result} = Scan Message With Rspamc ${MESSAGE} -i 127.0.0.1 @@ -25,41 +25,41 @@ MAP - IP HIT MAP - IP MISS ${result} = Scan Message With Rspamc ${MESSAGE} -i 127.0.0.2 - Check Rspamc ${result} IP_MAP inverse=1 rc_nocheck=1 + Check Rspamc ${result} IP_MAP inverse=1 rc_noinverse=1 MAP - IP MASK ${result} = Scan Message With Rspamc ${MESSAGE} -i 10.1.0.10 - Check Rspamc ${result} IP_MAP + Check Rspamc ${result} IP_MAP MAP - IP MASK MISS ${result} = Scan Message With Rspamc ${MESSAGE} -i 11.1.0.10 - Check Rspamc ${result} IP_MAP inverse=1 rc_nocheck=1 + Check Rspamc ${result} IP_MAP inverse=1 rc_noinverse=1 MAP - IP V6 ${result} = Scan Message With Rspamc ${MESSAGE} -i ::1 - Check Rspamc ${result} IP_MAP + Check Rspamc ${result} IP_MAP MAP - IP V6 MISS ${result} = Scan Message With Rspamc ${MESSAGE} -i fe80::1 - Check Rspamc ${result} IP_MAP inverse=1 rc_nocheck=1 + Check Rspamc ${result} IP_MAP inverse=1 rc_noinverse=1 MAP - FROM ${result} = Scan Message With Rspamc ${MESSAGE} --from user@example.com - Check Rspamc ${result} FROM_MAP + Check Rspamc ${result} FROM_MAP MAP - FROM MISS ${result} = Scan Message With Rspamc ${MESSAGE} --from user@other.com - Check Rspamc ${result} FROM_MAP inverse=1 rc_nocheck=1 + Check Rspamc ${result} FROM_MAP inverse=1 rc_noinverse=1 MAP - FROM REGEXP ${result} = Scan Message With Rspamc ${MESSAGE} --from user123@test.com - Check Rspamc ${result} REGEXP_MAP + Check Rspamc ${result} REGEXP_MAP ${result} = Scan Message With Rspamc ${MESSAGE} --from somebody@exAmplE.com - Check Rspamc ${result} REGEXP_MAP + Check Rspamc ${result} REGEXP_MAP MAP - FROM REGEXP MISS ${result} = Scan Message With Rspamc ${MESSAGE} --from user@other.org - Check Rspamc ${result} REGEXP_MAP inverse=1 rc_nocheck=1 + Check Rspamc ${result} REGEXP_MAP inverse=1 rc_noinverse=1 MAP - DEPENDS HIT ${result} = Scan Message With Rspamc ${MESSAGE} -i 147.243.1.47 --from user123@microsoft.com @@ -87,4 +87,4 @@ MAP - MULSYM SYMBOL MISS MAP - MULSYM SYMBOL + SCORE ${result} = Scan Message With Rspamc ${MESSAGE} --rcpt user5@example.com - Check Rspamc ${result} SYM1 (-10.0
\ No newline at end of file + Check Rspamc ${result} SYM1 (-10.0 diff --git a/test/functional/cases/103_password.robot b/test/functional/cases/103_password.robot index 93e55d683..3853572d4 100644 --- a/test/functional/cases/103_password.robot +++ b/test/functional/cases/103_password.robot @@ -1,5 +1,5 @@ *** Settings *** -Test Teardown Generic Teardown +Test Teardown Generic Teardown Library ${TESTDIR}/lib/rspamd.py Resource ${TESTDIR}/lib/rspamd.robot Variables ${TESTDIR}/lib/vars.py @@ -7,49 +7,48 @@ Variables ${TESTDIR}/lib/vars.py *** Variables *** ${CONFIG} ${TESTDIR}/configs/password.conf ${RSPAMD_SCOPE} Test -${PBKDF_PASSWORD} "$1$nxnwqu5t6ruqfzb4h7bs47ogmdk9sb74$c8mbmcfyd6aic1sm48qzxuzkw4nhx6te6h7owgxz63bcd7fqu1dy" +${PBKDF_PASSWORD} "$1$nxnwqu5t6ruqfzb4h7bs47ogmdk9sb74$c8mbmcfyd6aic1sm48qzxuzkw4nhx6te6h7owgxz63bcd7fqu1dy" ${CATENA_PASSWORD} "$2$9dydyukfndmi8zzp7rbdsu43y7a3iucg$1nketaa9pjqwwzzjxogcrniphw4y5fanixudpwzza85tcb56yzub" *** Test Cases *** PASSWORD - PBKDF [Setup] Password Setup ${PBKDF_PASSWORD} ${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q1 stat - Should Contain ${result.stdout} Messages scanned: + Check Rspamc ${result} Messages scanned: PASSWORD - PBKDF WRONG [Setup] Password Setup ${PBKDF_PASSWORD} ${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q1q1 stat - Should Contain ${result.stdout} Unauthorized rc_nocheck=1 + Check Rspamc ${result} Unauthorized PASSWORD - CATENA [Setup] Password Setup ${CATENA_PASSWORD} ${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q1 stat - Should Contain ${result.stdout} Messages scanned: - + Check Rspamc ${result} Messages scanned: PASSWORD - CATENA WRONG [Setup] Password Setup ${CATENA_PASSWORD} ${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q stat - Should Contain ${result.stdout} Unauthorized rc_nocheck=1 + Check Rspamc ${result} Unauthorized PASSWORD - ENABLE [Setup] Password Setup ${CATENA_PASSWORD} ${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q2 stat_reset - Should Contain ${result.stdout} Messages scanned: + Check Rspamc ${result} Messages scanned: PASSWORD - ENABLE WITH NORMAL [Setup] Password Setup ${CATENA_PASSWORD} ${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q1 stat_reset - Should Contain ${result.stdout} Unauthorized rc_nocheck=1 + Check Rspamc ${result} Unauthorized PASSWORD - ENABLE INCORRECT [Setup] Password Setup ${CATENA_PASSWORD} ${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q2q2 stat_reset - Should Contain ${result.stdout} Unauthorized rc_nocheck=1 + Check Rspamc ${result} Unauthorized *** Keywords *** Password Setup [Arguments] ${PASSWORD} ${ENABLE_PASSWORD}=q2 Set Test Variable ${PASSWORD} Set Test Variable ${ENABLE_PASSWORD} - Generic Setup
\ No newline at end of file + Generic Setup |