cls.killProcess(cls._dnsdist)
+class TestYamlInvalidComboAddress(DNSDistTest):
+ _yaml_config_template = """---
+logging:
+ structured:
+ enabled: false
+
+binds:
+ - listen_address: "127.0.0.1:%d"
+ protocol: Do53
+
+backends:
+ - address: "127.0.0.1:%d"
+ protocol: Do53
+
+query_rules:
+ - name: "A to (invalid) Tee Action"
+ selector:
+ type: "QType"
+ qtype: "A"
+ action:
+ type: "Tee"
+ rca: "a:"
+ lca: "127.0.0.1"
+"""
+ _yaml_config_params = ["_dnsDistPort", "_testServerPort"]
+ _config_params = []
+ _enableStructuredLoggingOnCL = False
+
+ def testFailToStart(self):
+ """
+ YAML: Fails to start with an invalid ComboAddress raising a PDNSException from C++ via the Rust library
+ """
+ pass
+
+ @classmethod
+ def setUpClass(cls):
+ failed = False
+ try:
+ cls.startDNSDist()
+ except AssertionError as err:
+ failed = True
+ expected = "dnsdist --check-config failed (1): b\"Error while parsing YAML file configs/dnsdist_TestYamlInvalidComboAddress.yml: Unable to convert presentation address 'a:'\\n\""
+ if str(err) != expected:
+ raise AssertionError("DNSdist should not start with an invalid ComboAddress in listen_address: %s" % (err))
+ if not failed:
+ raise AssertionError("DNSdist should not start with an invalid ComboAddress in listen_address")
+
+ @classmethod
+ def tearDownClass(cls):
+ if cls._dnsdist:
+ cls.killProcess(cls._dnsdist)
+
+
class TestYamlLuaCodeUsingObjects(DNSDistTest):
_yaml_config_template = """---
binds: