Description
One of the most important components of the new agent is the communicator. It is responsible for communication between the agent and the server in all directions. To do this, it uses the HttpClient class which was designed as a wrapper for boost asio/beast and interacts directly with the MultitypeQueue to get/store messages.
As part of this problem, a greater coverage of unit tests is requested, with which it will be possible to validate how the code reacts to each possible error code and message it receives or sends. In addition, it is necessary to mock each external function in order to be able to react to different return values and see how the agent behaves.
The testing should include, at least, the following classes:
HttpClient
Communicator
AgentRegistration
- Utils (
http_client_utils, message_queue_utils, command_handler_utils)
Tests should be as simple as possible and each one should test a particular scenario. In case we have already developed complex tests and/or tests that require changes or new mocks, these changes should also be made as part of this issue.
Description
One of the most important components of the new agent is the communicator. It is responsible for communication between the agent and the server in all directions. To do this, it uses the
HttpClientclass which was designed as a wrapper for boost asio/beast and interacts directly with theMultitypeQueueto get/store messages.As part of this problem, a greater coverage of unit tests is requested, with which it will be possible to validate how the code reacts to each possible error code and message it receives or sends. In addition, it is necessary to mock each external function in order to be able to react to different return values and see how the agent behaves.
The testing should include, at least, the following classes:
HttpClientCommunicatorAgentRegistrationhttp_client_utils,message_queue_utils,command_handler_utils)Tests should be as simple as possible and each one should test a particular scenario. In case we have already developed complex tests and/or tests that require changes or new mocks, these changes should also be made as part of this issue.