mirror of
https://github.com/espressif/openthread.git
synced 2026-10-02 22:07:36 +00:00
[dnssd] add tests for Service Instance names with spaces (#7143)
This commit adds tests to make sure Service Instance names with spaces are handled properly by SRP and DNS-SD.
This commit is contained in:
@@ -862,6 +862,7 @@ class OTCI(object):
|
||||
|
||||
def dns_resolve_service(self, instance: str, service: str) -> Dict:
|
||||
"""Resolves aservice instance."""
|
||||
instance = self.__escape_escapable(instance)
|
||||
cmd = f'dns service {instance} {service}'
|
||||
output = self.execute_command(cmd, 30.0)
|
||||
|
||||
@@ -1122,6 +1123,7 @@ class OTCI(object):
|
||||
priority: int = 0,
|
||||
weight: int = 0,
|
||||
txt: Dict[str, Union[str, bytes, bool]] = None):
|
||||
instance = self.__escape_escapable(instance)
|
||||
cmd = f'srp client service add {instance} {service} {port} {priority} {weight}'
|
||||
if txt:
|
||||
cmd += f' {self.__txt_to_hex(txt)}'
|
||||
|
||||
Reference in New Issue
Block a user