From 9f762ba4ad249e24492fe712892c1441668eec6a Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Wed, 16 Oct 2024 22:21:46 +0000 Subject: [PATCH] CI: test SoftwareHeader config flag --- test/files/test_milter_softwareheader.conf | 7 +++++++ test/test_milter.py | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/files/test_milter_softwareheader.conf diff --git a/test/files/test_milter_softwareheader.conf b/test/files/test_milter_softwareheader.conf new file mode 100644 index 0000000..6cf9bc5 --- /dev/null +++ b/test/files/test_milter_softwareheader.conf @@ -0,0 +1,7 @@ +Domain example.com +AuthservID example.com +KeyFile private.key +TestKeys public.key +Selector elpmaxe +Mode sv +SoftwareHeader true diff --git a/test/test_milter.py b/test/test_milter.py index 6be87d5..9dcd2a1 100644 --- a/test/test_milter.py +++ b/test/test_milter.py @@ -415,3 +415,11 @@ def test_milter_peerlist(run_miltertest): """Connections from peers just get `accept` back immediately""" with pytest.raises(miltertest.MilterError, match='unexpected response: a'): run_miltertest() + + +def test_milter_softwareheader(run_miltertest): + """Advertise software name, version""" + res = run_miltertest() + + assert res['headers'][0][0] == 'ARC-Filter' + assert res['headers'][0][1].startswith('OpenARC Filter v')