Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] update borderagent discover to allow network interface selection for mDNS binding #259

Merged
merged 13 commits into from
Apr 29, 2024
Merged
4 changes: 2 additions & 2 deletions src/app/border_agent_functions_mock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ void ClearBorderAgentFunctionsMock()
gBorderAgentFunctionsMock = nullptr;
}

Error DiscoverBorderAgent(BorderAgentHandler aBorderAgentHandler, size_t aTimeout)
Error DiscoverBorderAgent(BorderAgentHandler aBorderAgentHandler, size_t aTimeout, const std::string &aNetIf)
{
return gBorderAgentFunctionsMock->DiscoverBorderAgent(aBorderAgentHandler, aTimeout);
return gBorderAgentFunctionsMock->DiscoverBorderAgent(aBorderAgentHandler, aTimeout, aNetIf);
}

} // namespace commissioner
Expand Down
2 changes: 1 addition & 1 deletion src/app/border_agent_functions_mock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class BorderAgentFunctionsMock
public:
virtual ~BorderAgentFunctionsMock() = default;

MOCK_METHOD(Error, DiscoverBorderAgent, (BorderAgentHandler, size_t));
MOCK_METHOD(Error, DiscoverBorderAgent, (BorderAgentHandler, size_t, const std::string));
ZhangLe2016 marked this conversation as resolved.
Show resolved Hide resolved
};

void SetBorderAgentFunctionsMock(ot::commissioner::BorderAgentFunctionsMock *ptr);
Expand Down
2 changes: 1 addition & 1 deletion src/app/cli/interpreter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ TEST_F(InterpreterTestSuite, PC_BorderagentDiscover)
BorderAgentFunctionsMock bafm;
SetBorderAgentFunctionsMock(&bafm);

EXPECT_CALL(bafm, DiscoverBorderAgent(_, _)).WillOnce(Return(Error{}));
EXPECT_CALL(bafm, DiscoverBorderAgent(_, _, _)).WillOnce(Return(Error{}));

Interpreter::Expression expr;
Interpreter::Value value;
Expand Down
Loading