Closed roronoasins closed 1 year ago
Tester | PR commit |
---|---|
@roronoasins | https://github.com/wazuh/wazuh/pull/16235/commits/95553e1bd7183263ad0fcb2c023576dfb7d77eda |
OS | OS version | Deployment | Image/AMI | Notes |
---|---|---|---|---|
Ubuntu | 20.04 | Vagrant |
generic/ubuntu2004 |
The environment used for these tests was set up using the development team's file vagrantfile |
The manager was built from sources using the engine's dev branch
Since the format is required for the api endpoint, also the formats need to be tested
Case: {'command': 'catalog', 'subcommand': 'get', 'parameters': {'name': 'decoder'}}
Query: {'version': 1, 'origin': {'name': 'engine', 'module': 'api'}, 'command': 'catalog.resource/get', 'parameters': {'name': 'decoder'}}
Response: {"data":{"status":"ERROR","error":"Missing or invalid /format parameter"},"error":0}
root@engine:/media/sf_wazuh-qa/deps/wazuh_testing/wazuh_testing/modules/engine#
the format is required, while via CLI it is not
The json and yaml were checked with
After the testing, all seems good expect for some wrong behavior.
We have noted the errors to correct them in the next stage of the engine catalog review.
Thanks for the review.
Description
The purpose of this issue is to verify the API reorganization by testing this time using the API's socket the following commads:
catalog
Proposed cases
Scenario Outline 1: catalog - get already loaded items by their type
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is get And the parameters contains "Scenario 2: catalog - get not loaded items by their type
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is get And the parameters contains an item type that it is not supported within the name Then the api response will contain an error ```Scenario Outline 3: catalog - get already loaded items by their name
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is get And the parameters contains "Scenario Outline 4: catalog - get not loaded items by their name
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is get And the parameters contains "Scenario Outline 5: catalog - get already loaded items by their version
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is get And the parameters contains "Scenario Outline 6: catalog - get not loaded items by their version
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is get And the parameters contains "Scenario 7: catalog - get a non-existing collection type
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is get And the parameters contains an item name that does not exist Then the api response will contain an error ```Scenario Outline 8: catalog - update an item
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is update And the parameters contains "Scenario Outline 9: catalog - update a non-existing item
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is update And the parameters contains wrong items' "Scenario Outline 10: catalog - create an item
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is create And the parameters contains "Scenario 11: catalog - create an already existing item
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is create And the parameters contains the type and content to create And the json file is provided Then the response will contain an error And the already existing item was not modified And the item can be obtained by using the get subcommand ```Scenario 12: catalog - create a non-existing item type
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is create And the parameters contains a type that is not supported And the json file is provided Then the response will contain an error And the already loaded items did not change ```Scenario Outline 13: catalog - delete a loaded item
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is delete And the parameters contains a loaded "Scenario Outline 14: catalog - delete a loaded item id
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is delete And the parameters contains a loaded "Scenario Outline 15: catalog - delete a loaded item version
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is delete And the parameters contains a loaded "Scenario Outline 16: catalog - delete a non-existing item
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is delete And the parameters contains a non-existing "Scenario Outline 17: catalog - delete a non-existing item version
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is delete And the parameters contains a non-existing "Scenario 18: use a not valid name parameter format
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request parameter has more fields than expected Then the response will contain an error ```Scenario Outline 19: catalog - validate a item type with valid syntax
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is validate And the parameters contains the item "Scenario Outline 20: catalog - validate a decoder with some missing section
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request subcommand is validate And the parameters contains the decoder name and the file And the file does not contain the "Scenario 21: catalog - validate an item with non-valid formatting
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request parameter format is json And the request parameter content has no valid format Then the response will contain an error ```Scenario 22: catalog - validate an item with wrong name parameter value
```Gherkin Given a manager with the engine And the ruleset loaded When requesting to the engine's api socket And the request parameter name has not the name that appears within the content parameter Then the response will contain an error ```Status