*** Settings ***
Suite Setup Rspamadm Setup
Suite Teardown Rspamadm Teardown
-Library Process
-Library ../lib/rspamd.py
+Library ${RSPAMD_TESTDIR}/lib/rspamd.py
+Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
*** Test Cases ***
Config Test
Should Match Regexp ${result.stderr} ^$
Should Match Regexp ${result.stdout} hello world\n
Should Be Equal As Integers ${result.rc} 0
-
-*** Keywords ***
-Rspamadm Setup
- ${RSPAMADM_TMPDIR} = Make Temporary Directory
- Set Suite Variable ${RSPAMADM_TMPDIR}
-
-Rspamadm Teardown
- Cleanup Temporary Directory ${RSPAMADM_TMPDIR}
-
-Rspamadm
- [Arguments] @{args}
- ${result} = Run Process ${RSPAMADM}
- ... --var\=TMPDIR\=${RSPAMADM_TMPDIR}
- ... --var\=DBDIR\=${RSPAMADM_TMPDIR}
- ... --var\=LOCAL_CONFDIR\=/nonexistent
- ... @{args}
- [Return] ${result}
... --var\=DBDIR\=${RSPAMD_TMPDIR}
... --var\=LOCAL_CONFDIR\=/non-existent
... --var\=CONFDIR\=${RSPAMD_TESTDIR}/../../conf/
+ ... --insecure
... env:RSPAMD_LOCAL_CONFDIR=/non-existent
... env:RSPAMD_TMPDIR=${RSPAMD_TMPDIR}
... env:RSPAMD_CONFDIR=${RSPAMD_TESTDIR}/../../conf/
# Confirm worker is reachable
Wait Until Keyword Succeeds 15x 1 sec Ping Rspamd ${RSPAMD_LOCAL_ADDR} ${check_port}
+Rspamadm Setup
+ ${RSPAMADM_TMPDIR} = Make Temporary Directory
+ Set Suite Variable ${RSPAMADM_TMPDIR}
+
+Rspamadm Teardown
+ Cleanup Temporary Directory ${RSPAMADM_TMPDIR}
+
+Rspamadm
+ [Arguments] @{args}
+ ${result} = Run Process ${RSPAMADM}
+ ... --var\=TMPDIR\=${RSPAMADM_TMPDIR}
+ ... --var\=DBDIR\=${RSPAMADM_TMPDIR}
+ ... --var\=LOCAL_CONFDIR\=/nonexistent
+ ... @{args}
+ [Return] ${result}
Run Nginx
${template} = Get File ${RSPAMD_TESTDIR}/configs/nginx.conf
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+
import shutil
import socket