Skip to content

wazuh-passwords-tool integration tests and unit tests #589

@c-bordon

Description

@c-bordon

Related

https://github.com/wazuh/wazuh-automation/issues/2940

Description

Integration tests

Integration test suites should be defined for each of the Installation Assistant tools (wazuh-certs-tool, wazuh-passwords-tool, and wazuh-install). Each suite must validate that the corresponding tool works correctly end to end, including both successful and error scenarios.

wazuh-passwords-tool integration tests

  • Verify that user passwords are correctly changed
  • Validate changes for both Wazuh API users and Indexer internal users
  • Verify error handling when attempting to change the password of a non-existent user
  • Verify error handling when invalid input parameters are provided

Unit tests

Unit test must remain in the wazuh-installation-assistant repository, this test need to validate the code structure and the correctness of each method and function.

Note

Since the codebase is written in Bash, using a comprehensive testing framework like those available for other programming languages is more challenging. However, the BATS library can be used to implement these unit tests effectively.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions