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

Disable cache in POST requests (agents) #403

Merged
merged 1 commit into from
Jun 11, 2019
Merged

Disable cache in POST requests (agents) #403

merged 1 commit into from
Jun 11, 2019

Conversation

druizz90
Copy link
Contributor

Hi team,

This PR closes #391. Cache was removed in agents endpoints which use POST method.

Best regards,

Demetrio.

@druizz90 druizz90 requested a review from crd1985 June 11, 2019 11:36
@druizz90 druizz90 self-assigned this Jun 11, 2019
@druizz90 druizz90 changed the title Disable cache in POST requests Disable cache in POST requests (agents) Jun 11, 2019
@druizz90
Copy link
Contributor Author

Tests performed

Mocha tests

Agents

# mocha test/test_agents.js --timeout=10000


  Agents
    GET/agents
       Request (233ms)
       Pagination (275ms)
       Retrieve all elements with limit=0 (271ms)
       Sort (277ms)
       Wrong Sort (245ms)
       Search (283ms)
       Selector (253ms)
       Not allowed selector (246ms)
       Version (260ms)
       Os.platform (268ms)
       Os.version (273ms)
       ManagerHost (250ms)Filters: status (259ms)Filters: status 2 (250ms)Filters: Invalid filterFilters: Invalid filter - Extra fieldFilters: older_than (257ms)Filters: group (238ms)Select: single field (243ms)Select: multiple fields (262ms)Select: wrong field (259ms)Select: invalid characterFilters: query (242ms)
    GET/agents/summary
       Request (235ms)
    GET/agents/summary/os
       Request (279ms)
    GET/agents/outdated
       Request (228ms)
    GET/agents/:agent_id
       Request (manager) (261ms)
       Request (agent) (273ms)
       Selector (267ms)
       Not allowed selector (237ms)Params: Bad agent idErrors: No agent (239ms)
       Select (287ms)Select: wrong field (306ms)
    GET/agents/name/:agent_name
       Request (221ms)
       Wrong name (270ms)
       Selector (280ms)
       Not allowed selector (243ms)
    GET/agents/:agent_id/key
       Request (238ms)Params: Bad agent idErrors: No key (247ms)
    PUT/agents/groups/:group_id
       Request (273ms)Params: Bad group nameParams: Group already exists (238ms)
    PUT/agents/:agent_id/group/:group_id
       Request (242ms)Params: Bad agent nameParams: Agent does not exist (248ms)Params: Replace parameter (268ms)
    POST/agents/groups/:group_id/files/:file_name
       Request (253ms)
       ErrorOnBadGroup (260ms)
       ErrorOnEmptyConf
       OnlyAgentConfAllowed (257ms)
       InvalidConfDetected
       WrongConfDetected (257ms)
       TooBigXML
    GET/agents/no_group
       Request (241ms)
       Pagination (262ms)
       Retrieve all elements with limit=0 (235ms)
       Sort (258ms)
       Search (256ms)
       Select (244ms)
       Wrong select (237ms)Filter: status (241ms)
    GET/agents/groups
       Request (237ms)
       Retrieve all elements with limit=0 (244ms)
       Hash algorithm (242ms)
       Wrong Hash algorithm (243ms)
    GET/agents/groups/:group_id
       Request (255ms)Params: Bad group name
       Retrieve all elements with limit=0 (236ms)
       Select (245ms)Filter: status (240ms)
    GET/agents/groups/:group_id/configuration
       Request (256ms)Params: Bad group name
       Retrieve all elements with limit=0 (242ms)
    GET/agents/groups/:group_id/files
       Request (237ms)Params: Bad group name
       Retrieve all elements with limit=0 (245ms)
       Hash algorithm (243ms)
       Wrong Hash algorithm (257ms)
    GET/agents/groups/:group_id/files/:filename
       Request (237ms)
       UsingFormatAgentConfXML (235ms)
       UsingFormatAgentConfJSON (240ms)
       UsingFormatRootcheckXML (238ms)
       UsingFormatRootcheckJSON (252ms)Params: Bad group name
    POST/agents/groups/:group_id/configuration
       Request (233ms)
       ErrorOnBadGroup (247ms)
       ErrorOnEmptyConf
       InvalidConfDetected
       WrongConfDetected (265ms)
       TooBigXML
    DELETE/agents/:agent_id/group
       Request (243ms)Errors: ID is not present (236ms)Params: Bad agent id
    DELETE/agents/:agent_id/group/:group_id
       Request (230ms)Errors: ID is not present (235ms)Errors: Group is not present (235ms)Params: Bad agent idParams: Bad group id (249ms)
    DELETE/agents/groups/:group_id
       Request (240ms)Params: Bad group id
    DELETE/agents
       RequestFilter: older_than, status and ids (3799ms)Errors: Get deleted agent (303ms)Filter: older_than (244ms)
    GET/agents/stats/distinct
       Request (250ms)
       Pagination (242ms)
       Retrieve all elements with limit=0 (249ms)
       Sort (238ms)
       Search (241ms)
       Select (245ms)
       Wrong select (235ms)
    GET/agents/:agent/config/:component/:configuration
       Request-Agent-Client (260ms)
       Request-Agent-Buffer (259ms)
       Request-Agent-Labels (253ms)
       Request-Agent-Internal (261ms)
       Request-Agentless-Agentless (242ms)
       Request-Analysis-Global (255ms)
       Request-Analysis-Active-response (241ms)
       Request-Analysis-Alerts (241ms)
       Request-Analysis-Command (234ms)
       Request-Analysis-Internal (243ms)
       Request-Auth-Auth (251ms)
       Request-Com-Active-response (250ms)
       Request-Com-Internal (253ms)
       Request-Csyslog-Csyslog (248ms)
       Request-Integrator-Integration (240ms)
       Request-Logcollector-Localfile (260ms)
       Request-Logcollector-Socket (254ms)
       Request-Logcollector-Internal (260ms)
       Request-Mail-Global (259ms)
       Request-Mail-Alerts (242ms)
       Request-Mail-Internal (250ms)
       Request-Monitor-Internal (253ms)
       Request-Request-Remote (250ms)
       Request-Request-Internal (253ms)
       Request-Syscheck-Syscheck (262ms)
       Request-Syscheck-Rootcheck (268ms)
       Request-Syscheck-Internal (258ms)
       Request-Wmodules-Wmodules (272ms)
    PUT/agents/restart
       Request (300ms)
    PUT/agents/:agent_id/restart
       Request (274ms)Params: Bad agent id
       Request (242ms)
    POST/agents/restart
       Request (249ms)Params: A good id and a bad one (250ms)Params: Bad agent id
       Request (249ms)


  149 passing (38s)

@crd1985 crd1985 merged commit 4f81b9a into 3.10 Jun 11, 2019
@crd1985 crd1985 deleted the disable-cache-391 branch June 11, 2019 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants