Debian Codegraph @

test/functional/cases/001_merged/099_control.robot

raw
1 *** Settings ***
2 Library ${RSPAMD_TESTDIR}/lib/rspamd.py
3 Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
4 Variables ${RSPAMD_TESTDIR}/lib/vars.py
5
6 *** Test Cases ***
7 CONTROL STAT
8 [Documentation] Test control socket stat command
9 ${result} = Run Control Command stat ${RSPAMD_TMPDIR}/rspamd.sock
10 Should Be Equal As Integers ${result.rc} 0
11 Should Contain ${result.stdout} workers
12 Should Contain ${result.stdout} total
13
14 CONTROL STAT JSON
15 [Documentation] Test control socket stat command with JSON output
16 ${result} = Run Control Command JSON stat ${RSPAMD_TMPDIR}/rspamd.sock
17 Should Be Equal As Integers ${result.rc} 0
18 Should Contain ${result.stdout} "workers"
19 Should Contain ${result.stdout} "total"
20
21 CONTROL RERESOLVE
22 [Documentation] Test control socket reresolve command
23 ${result} = Run Control Command reresolve ${RSPAMD_TMPDIR}/rspamd.sock
24 Should Be Equal As Integers ${result.rc} 0
25
26 CONTROL FUZZY SYNC
27 [Documentation] Test control socket fuzzy_sync command
28 ${result} = Run Control Command fuzzy_sync ${RSPAMD_TMPDIR}/rspamd.sock
29 Should Be Equal As Integers ${result.rc} 0
30
31 CONTROL COMPOSITES STATS
32 [Documentation] Test control socket composites_stats command
33 ${result} = Run Control Command composites_stats ${RSPAMD_TMPDIR}/rspamd.sock
34 Should Be Equal As Integers ${result.rc} 0
35 Should Contain ${result.stdout} checked_slow
36
37 CONTROL COMPOSITES STATS JSON
38 [Documentation] Test control socket composites_stats command with JSON output
39 ${result} = Run Control Command JSON composites_stats ${RSPAMD_TMPDIR}/rspamd.sock
40 Should Be Equal As Integers ${result.rc} 0
41 Should Contain ${result.stdout} checked_slow
42
43 CONTROL MULTIPLE COMMANDS
44 [Documentation] Test multiple control socket commands in sequence to verify ID matching
45 ${result1} = Run Control Command stat ${RSPAMD_TMPDIR}/rspamd.sock
46 Should Be Equal As Integers ${result1.rc} 0
47 ${result2} = Run Control Command reresolve ${RSPAMD_TMPDIR}/rspamd.sock
48 Should Be Equal As Integers ${result2.rc} 0
49 ${result3} = Run Control Command composites_stats ${RSPAMD_TMPDIR}/rspamd.sock
50 Should Be Equal As Integers ${result3.rc} 0
51 ${result4} = Run Control Command stat ${RSPAMD_TMPDIR}/rspamd.sock
52 Should Be Equal As Integers ${result4.rc} 0