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

Increase test coverage of network functions #418

Open
TomasTurina opened this issue Dec 12, 2024 · 0 comments
Open

Increase test coverage of network functions #418

TomasTurina opened this issue Dec 12, 2024 · 0 comments
Assignees
Labels

Comments

@TomasTurina
Copy link
Member

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.

@vikman90 vikman90 added type/enhancement Enhancement issue and removed type/test Test issue labels Dec 13, 2024
@TomasTurina TomasTurina assigned Nicogp and aritosteles and unassigned Nicogp Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants