Pārlūkot izejas kodu

[Test] Working with bloody robot to add some new tests

tags/3.8.2
Vsevolod Stakhov pirms 3 mēnešiem
vecāks
revīzija
9fae4ea25b
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam

+ 14
- 0
test/functional/cases/120_fuzzy/encrypted-dyn1.robot Parādīt failu

@@ -0,0 +1,14 @@
*** Settings ***
Suite Setup Fuzzy Setup Encrypted Dyn1 Siphash
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***
Fuzzy Add
Fuzzy Multimessage Add Test

Fuzzy Fuzzy
Fuzzy Multimessage Fuzzy Test

Fuzzy Miss
Fuzzy Multimessage Miss Test

+ 14
- 0
test/functional/cases/120_fuzzy/encrypted-dyn2.robot Parādīt failu

@@ -0,0 +1,14 @@
*** Settings ***
Suite Setup Fuzzy Setup Encrypted Dyn2 Siphash
Suite Teardown Rspamd Redis Teardown
Resource lib.robot

*** Test Cases ***
Fuzzy Add
Fuzzy Multimessage Add Test

Fuzzy Fuzzy
Fuzzy Multimessage Fuzzy Test

Fuzzy Miss
Fuzzy Multimessage Miss Test

+ 0
- 8
test/functional/cases/120_fuzzy/encrypted.robot Parādīt failu

@@ -12,11 +12,3 @@ Fuzzy Fuzzy

Fuzzy Miss
Fuzzy Multimessage Miss Test

Fuzzy Fuzzy Dynamic Key
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTION_KEY} "mbggdnw3tdx7r3ruakjecpf5hcqr4cb4nmdp1fxynx3drbyujb3y"
Fuzzy Multimessage Fuzzy Encrypted Test

Fuzzy Fuzzy Another Dynamic Key
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTION_KEY} "c98d3pnb7ejjz1rkobumbbjzo5pbeh64rj68dudy8w7h8mipg1by"
Fuzzy Multimessage Fuzzy Encrypted Test

+ 26
- 1
test/functional/cases/120_fuzzy/lib.robot Parādīt failu

@@ -107,15 +107,34 @@ Fuzzy Setup Encrypted
Set Suite Variable ${RSPAMD_FUZZY_ALGORITHM} ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTED_ONLY} true
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTION_KEY} ${RSPAMD_KEY_PUB1}
Set Suite Variable ${RSPAMD_FUZZY_CLIENT_ENCRYPTION_KEY} ${RSPAMD_KEY_PUB1}
Set Suite Variable ${RSPAMD_FUZZY_INCLUDE} ${RSPAMD_TESTDIR}/configs/fuzzy-encryption-key.conf
Rspamd Redis Setup

Fuzzy Setup Encrypted Keyed
Fuzzy Setup Encrypted Dyn1
[Arguments] ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_ALGORITHM} ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTED_ONLY} true
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTION_KEY} ${RSPAMD_KEY_PUB1}
Set Suite Variable ${RSPAMD_FUZZY_CLIENT_ENCRYPTION_KEY} ${RSPAMD_KEY_PUB2}
Set Suite Variable ${RSPAMD_FUZZY_INCLUDE} ${RSPAMD_TESTDIR}/configs/fuzzy-encryption-key.conf
Rspamd Redis Setup

Fuzzy Setup Encrypted Dyn2
[Arguments] ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_ALGORITHM} ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTED_ONLY} true
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTION_KEY} ${RSPAMD_KEY_PUB1}
Set Suite Variable ${RSPAMD_FUZZY_CLIENT_ENCRYPTION_KEY} ${RSPAMD_KEY_PUB3}
Set Suite Variable ${RSPAMD_FUZZY_INCLUDE} ${RSPAMD_TESTDIR}/configs/fuzzy-encryption-key.conf
Rspamd Redis Setup

Fuzzy Setup Encrypted Keyed
[Arguments] ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_ALGORITHM} ${algorithm}
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTED_ONLY} true
Set Suite Variable ${RSPAMD_FUZZY_ENCRYPTION_KEY} ${RSPAMD_KEY_PUB1}
Set Suite Variable ${RSPAMD_FUZZY_CLIENT_ENCRYPTION_KEY} ${RSPAMD_KEY_PUB1}
Set Suite Variable ${RSPAMD_FUZZY_KEY} mYN888sydwLTfE32g2hN
Set Suite Variable ${RSPAMD_FUZZY_SHINGLES_KEY} hXUCgul9yYY3Zlk1QIT2
Rspamd Redis Setup
@@ -159,6 +178,12 @@ Fuzzy Setup Keyed Xxhash
Fuzzy Setup Encrypted Siphash
Fuzzy Setup Encrypted siphash

Fuzzy Setup Encrypted Dyn1 Siphash
Fuzzy Setup Encrypted Dyn1 siphash

Fuzzy Setup Encrypted Dyn2 Siphash
Fuzzy Setup Encrypted Dyn2 siphash

Fuzzy Skip Hash Test Message
FOR ${i} IN @{MESSAGES_SKIP}
Fuzzy Skip Add Test Base ${i}

+ 1
- 1
test/functional/configs/fuzzy-encryption-key.conf Parādīt failu

@@ -1,2 +1,2 @@
# Setting this to null does not work out so it's hidden in an include
encryption_key = {= env.FUZZY_ENCRYPTION_KEY =};
encryption_key = {= env.FUZZY_CLIENT_ENCRYPTION_KEY =};

+ 64
- 0
test/functional/lib/vars.py Parādīt failu

@@ -1,3 +1,65 @@
# Copyright 2024 Vsevolod Stakhov
#
# 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.
#
# 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

@@ -6,6 +68,8 @@ HAVE_MILTERTEST = shutil.which('miltertest') and True or False
RSPAMD_EXTERNAL_RELAY_ENABLED = False
RSPAMD_KEY_PVT1 = 'ekd3x36tfa5gd76t6pa8hqif3ott7n1siuux68exbkk7ukscte9y'
RSPAMD_KEY_PUB1 = 'm8kneubpcjsb8sbsoj7jy7azj9fdd3xmj63txni86a8ye9ncomny'
RSPAMD_KEY_PUB2 = 'mbggdnw3tdx7r3ruakjecpf5hcqr4cb4nmdp1fxynx3drbyujb3y'
RSPAMD_KEY_PUB3 = 'zhypei8sartqrtow84dddgp5exh3gsr65kbw88wj7ppot1bwmuiy'
RSPAMD_LOCAL_ADDR = '127.0.0.1'
RSPAMD_MAP_WATCH_INTERVAL = '1min'
RSPAMD_PORT_CONTROLLER = 56790

Notiek ielāde…
Atcelt
Saglabāt