| 1 |
Feature: vhost by policy_context |
| 2 |
The mtpolicyd must select the hostname by the policy_context field |
| 3 |
in case the vhost_by_policy_context option is set in configuration. |
| 4 |
|
| 5 |
Scenario: mtpolicyd must select the correct vhost (fred) |
| 6 |
Given that a mtpolicyd is running with configuration t-data/vhost-by-policy-context.conf |
| 7 |
When the following request is executed on mtpolicyd: |
| 8 |
""" |
| 9 |
policy_context=fred |
| 10 |
""" |
| 11 |
Then mtpolicyd must respond with a action like ^reject my name is fred |
| 12 |
And the mtpolicyd server must be stopped successfull |
| 13 |
|
| 14 |
Scenario: mtpolicyd must select the correct vhost (horst) |
| 15 |
Given that a mtpolicyd is running with configuration t-data/vhost-by-policy-context.conf |
| 16 |
When the following request is executed on mtpolicyd: |
| 17 |
""" |
| 18 |
policy_context=horst |
| 19 |
""" |
| 20 |
Then mtpolicyd must respond with a action like ^reject my name is horst |
| 21 |
And the mtpolicyd server must be stopped successfull |
| 22 |
|
| 23 |
Scenario: mtpolicyd must select the correct vhost (default is fred) |
| 24 |
Given that a mtpolicyd is running with configuration t-data/vhost-by-policy-context.conf |
| 25 |
When the following request is executed on mtpolicyd: |
| 26 |
""" |
| 27 |
client_address=127.0.0.1 |
| 28 |
""" |
| 29 |
Then mtpolicyd must respond with a action like ^reject my name is fred |
| 30 |
And the mtpolicyd server must be stopped successfull |
| 31 |
|