Browse Source

[Test] Add settings id tests

tags/2.0
Vsevolod Stakhov 5 years ago
parent
commit
ec7eeb6332
2 changed files with 26 additions and 1 deletions
  1. 12
    0
      test/functional/cases/108_settings.robot
  2. 14
    1
      test/functional/configs/settings.conf

+ 12
- 0
test/functional/cases/108_settings.robot View File

@@ -63,6 +63,18 @@ ENABLE GROUP - NORMAL
Should Not Contain ${result.stdout} SIMPLE_PRE
Should Not Contain ${result.stdout} SIMPLE_POST

SETTINGS ID - NORMAL
${result} = Scan Message With Rspamc ${MESSAGE} --header Settings-Id=id_test
Check Rspamc ${result} SIMPLE_TEST
Should Not Contain ${result.stdout} SIMPLE_PRE
Should Not Contain ${result.stdout} SIMPLE_POST

SETTINGS ID - PRE
${result} = Scan Message With Rspamc ${MESSAGE} --header Settings-Id=id_pre
Check Rspamc ${result} SIMPLE_PRE
Should Not Contain ${result.stdout} SIMPLE_TEST
Should Not Contain ${result.stdout} SIMPLE_POST

*** Keywords ***
Settings Setup
${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/settings.conf

+ 14
- 1
test/functional/configs/settings.conf View File

@@ -1,3 +1,16 @@
lua = ${LUA_SCRIPT};

settings { }
settings {
id_test {
id = "id_test";
apply {
symbols_enabled = ["SIMPLE_TEST"];
}
}

id_pre { # implicit id
apply {
symbols_enabled = ["SIMPLE_PRE"];
}
}
}

Loading…
Cancel
Save