test: fix coap authz suite failures

This commit is contained in:
JianBo He 2022-08-11 18:14:38 +08:00
parent 55c1a1868a
commit d6b222d1ff
1 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ t_case_coap_publish(_) ->
Prefix = Mod:ps_prefix(), Prefix = Mod:ps_prefix(),
Fun = fun(Channel, Token, Topic, Checker) -> Fun = fun(Channel, Token, Topic, Checker) ->
TopicStr = binary_to_list(Topic), TopicStr = binary_to_list(Topic),
URI = Prefix ++ TopicStr ++ "?clientid=client1&token=" ++ Token, URI = Prefix ++ "/" ++ TopicStr ++ "?clientid=client1&token=" ++ Token,
Req = Mod:make_req(post, <<>>), Req = Mod:make_req(post, <<>>),
Checker(Mod:do_request(Channel, URI, Req)) Checker(Mod:do_request(Channel, URI, Req))
@ -114,7 +114,7 @@ t_case_coap_subscribe(_) ->
Prefix = Mod:ps_prefix(), Prefix = Mod:ps_prefix(),
Fun = fun(Channel, Token, Topic, Checker) -> Fun = fun(Channel, Token, Topic, Checker) ->
TopicStr = binary_to_list(Topic), TopicStr = binary_to_list(Topic),
URI = Prefix ++ TopicStr ++ "?clientid=client1&token=" ++ Token, URI = Prefix ++ "/" ++ TopicStr ++ "?clientid=client1&token=" ++ Token,
Req = Mod:make_req(get, <<>>, [{observe, 0}]), Req = Mod:make_req(get, <<>>, [{observe, 0}]),
Checker(Mod:do_request(Channel, URI, Req)) Checker(Mod:do_request(Channel, URI, Req))