Skip to content

Commit

Permalink
Merge pull request #12844 from wazuh/feature/12814-add-cluster_contro…
Browse files Browse the repository at this point in the history
…l-unittests

Add unittest for `cluster_control.py`
  • Loading branch information
AdriiiPRodri committed May 11, 2022
2 parents 335abe3 + f94ed1e commit 6925ab2
Show file tree
Hide file tree
Showing 2 changed files with 375 additions and 3 deletions.
10 changes: 7 additions & 3 deletions framework/scripts/cluster_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def usage():
\t-a -fn <node_name> <agent_status> # List agents reporting to certain node and with certain status
\t-i # Check cluster health
\t-i -fn <node_name> # Check certain node's health
Params:
\t-l, --list
Expand All @@ -200,12 +200,12 @@ def usage():
\t-fs, --filter-agent-status
\t-a, --list-agents
\t-i, --health
""".format(path.basename(sys.argv[0]))
print(msg)


if __name__ == '__main__':
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-d', '--debug', action='store_true', dest='debug', help="Enable debug mode")
parser.add_argument('-fn', '--filter-node', dest='filter_node', nargs='*', type=str, help="Filter by node name")
Expand Down Expand Up @@ -253,3 +253,7 @@ def usage():
logging.error(e)
if args.debug:
raise


if __name__ == '__main__':
main()

0 comments on commit 6925ab2

Please sign in to comment.