Skip to content

Commit

Permalink
riotctrl_shell.cord_ep: remove regif parameter
Browse files Browse the repository at this point in the history
The argument regif was removed from the shell command in RIOT-OS#18053,
so there is not much need to keep it in the ShellInteraction for that command.
  • Loading branch information
miri64 committed Oct 10, 2022
1 parent abf0883 commit fa72453
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
7 changes: 2 additions & 5 deletions dist/pythonlibs/riotctrl_shell/cord_ep.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,8 @@ def cord_ep_cmd(self, cmd, args=None, timeout=-1, async_=False):
def cord_ep_info(self, timeout=-1, async_=False):
return self.cord_ep_cmd(self.INFO, None, timeout, async_)

def cord_ep_register(self, uri, regif=None, timeout=-1, async_=False):
args = [uri]
if regif is not None:
args.append(regif)
return self.cord_ep_cmd(self.REGISTER, args, timeout, async_)
def cord_ep_register(self, uri, timeout=-1, async_=False):
return self.cord_ep_cmd(self.REGISTER, (uri,), timeout, async_)

def cord_ep_discover(self, uri, timeout=-1, async_=False):
return self.cord_ep_cmd(self.DISCOVER, (uri,), timeout, async_)
Expand Down
10 changes: 5 additions & 5 deletions dist/pythonlibs/riotctrl_shell/tests/test_cord_ep.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ def test_cord_ep_parser_empty():


@pytest.mark.parametrize(
"uri,regif,expected",
"uri,expected",
[
("[fe80::1]", None, "cord_ep register [fe80::1]"),
("[fe80::1%iface0]", None, "cord_ep register [fe80::1%iface0]"),
("[fe80::1]:5684", None, "cord_ep register [fe80::1]:5684"),
("[fe80::1]", "/regif", "cord_ep register [fe80::1] /regif"),
("coap://[fe80::1]", "cord_ep register coap://[fe80::1]"),
("coap://[fe80::1%iface0]", "cord_ep register coap://[fe80::1%iface0]"),
("coap://[fe80::1]:5684", "cord_ep register coap://[fe80::1]:5684"),
("coap://[fe80::1]/regif", "cord_ep register coap://[fe80::1]/regif"),
]
)
def test_cord_ep_register(uri, regif, expected):
Expand Down

0 comments on commit fa72453

Please sign in to comment.