-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Test: API #10
Comments
I made test in Ubuntu 18 and CentOS 7 with API installed in both. Below there are the results of tests: AgentsAgents
GET/agents
✓ Request (280ms)
✓ Pagination (297ms)
✓ Retrieve all elements with limit=0 (392ms)
1) Sort
✓ Wrong Sort (449ms)
✓ Search (359ms)
✓ Selector (520ms)
✓ Not allowed selector (536ms)
✓ Version (490ms)
✓ Os.platform (543ms)
✓ Os.version (489ms)
✓ ManagerHost (583ms)
✓ Filters: status (554ms)
✓ Filters: status 2 (657ms)
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field (51ms)
✓ Filters: older_than (586ms)
✓ Filters: group (392ms)
✓ Select: single field (539ms)
✓ Select: multiple fields (574ms)
✓ Select: wrong field (426ms)
✓ Select: invalid character
✓ Filters: query (544ms)
GET/agents/summary
✓ Request (535ms)
GET/agents/summary/os
✓ Request (588ms)
GET/agents/outdated
✓ Request (533ms)
GET/agents/:agent_id
✓ Request (manager) (452ms)
✓ Request (agent) (546ms)
✓ Selector (1069ms)
✓ Not allowed selector (831ms)
✓ Params: Bad agent id
✓ Errors: No agent (461ms)
✓ Select (372ms)
✓ Select: wrong field (416ms)
GET/agents/name/:agent_name
✓ Request (394ms)
✓ Wrong name (372ms)
✓ Selector (444ms)
✓ Not allowed selector (379ms)
GET/agents/:agent_id/key
✓ Request (428ms)
✓ Params: Bad agent id
✓ Errors: No key (598ms)
PUT/agents/groups/:group_id
✓ Request (730ms)
✓ Params: Bad group name (41ms)
✓ Params: Group already exists (727ms)
PUT/agents/:agent_id/group/:group_id
✓ Request (365ms)
✓ Params: Bad agent name
✓ Params: Agent does not exist (352ms)
✓ Params: Replace parameter (325ms)
POST/agents/groups/:group_id/files/:file_name
✓ Request (376ms)
✓ ErrorOnBadGroup (360ms)
✓ ErrorOnEmptyConf (41ms)
✓ OnlyAgentConfAllowed (377ms)
✓ InvalidConfDetected
✓ WrongConfDetected (404ms)
2) TooBigXML
GET/agents/no_group
✓ Request (248ms)
✓ Pagination (269ms)
✓ Retrieve all elements with limit=0 (266ms)
✓ Sort (392ms)
✓ Search (395ms)
✓ Select (339ms)
✓ Wrong select (347ms)
✓ Filter: status (261ms)
GET/agents/groups
✓ Request (303ms)
✓ Retrieve all elements with limit=0 (278ms)
✓ Hash algorithm (345ms)
✓ Wrong Hash algorithm (363ms)
GET/agents/groups/:group_id
✓ Request (343ms)
✓ Params: Bad group name
✓ Retrieve all elements with limit=0 (338ms)
✓ Select (346ms)
✓ Filter: status (314ms)
GET/agents/groups/:group_id/configuration
3) Request
✓ Params: Bad group name
✓ Retrieve all elements with limit=0 (331ms)
GET/agents/groups/:group_id/files
✓ Request (257ms)
✓ Params: Bad group name
✓ Retrieve all elements with limit=0 (307ms)
✓ Hash algorithm (406ms)
✓ Wrong Hash algorithm (321ms)
GET/agents/groups/:group_id/files/:filename
✓ Request (314ms)
✓ UsingFormatAgentConfXML (264ms)
✓ UsingFormatAgentConfJSON (311ms)
✓ UsingFormatRootcheckXML (358ms)
✓ UsingFormatRootcheckJSON (318ms)
✓ Params: Bad group name
POST/agents/groups/:group_id/configuration
✓ Request (414ms)
✓ ErrorOnBadGroup (390ms)
✓ ErrorOnEmptyConf
✓ InvalidConfDetected
✓ WrongConfDetected (444ms)
4) TooBigXML
DELETE/agents/:agent_id/group
✓ Request (406ms)
✓ Errors: ID is not present (330ms)
✓ Params: Bad agent id
DELETE/agents/:agent_id/group/:group_id
✓ Request (362ms)
✓ Errors: ID is not present (326ms)
✓ Errors: Group is not present (424ms)
✓ Params: Bad agent id
✓ Params: Bad group id (363ms)
DELETE/agents/groups/:group_id
✓ Request (390ms)
✓ Params: Bad group id
PUT/agents/restart
✓ Request (281ms)
PUT/agents/:agent_id/restart
✓ Request (481ms)
✓ Params: Bad agent id
✓ Request (361ms)
DELETE/agents
✓ Request
✓ Filter: older_than, status and ids (4099ms)
✓ Errors: Get deleted agent (465ms)
✓ Filter: older_than (549ms)
GET/agents/stats/distinct
✓ Request (395ms)
✓ Pagination (513ms)
✓ Retrieve all elements with limit=0 (526ms)
✓ Sort (410ms)
✓ Search (524ms)
✓ Select (386ms)
✓ Wrong select (447ms)
GET/agents/:agent/config/:component/:configuration
✓ Request-Agent-Client (428ms)
✓ Request-Agent-Buffer (651ms)
✓ Request-Agent-Labels (730ms)
✓ Request-Agent-Internal (718ms)
✓ Request-Agentless-Agentless (590ms)
✓ Request-Analysis-Global (571ms)
✓ Request-Analysis-Active-response (650ms)
✓ Request-Analysis-Alerts (625ms)
✓ Request-Analysis-Command (474ms)
✓ Request-Analysis-Internal (509ms)
✓ Request-Auth-Auth (664ms)
✓ Request-Com-Active-response (663ms)
✓ Request-Com-Internal (503ms)
✓ Request-Csyslog-Csyslog (535ms)
✓ Request-Integrator-Integration (535ms)
✓ Request-Logcollector-Localfile (434ms)
✓ Request-Logcollector-Socket (464ms)
✓ Request-Logcollector-Internal (508ms)
✓ Request-Mail-Global (464ms)
✓ Request-Mail-Alerts (424ms)
✓ Request-Mail-Internal (452ms)
✓ Request-Monitor-Internal (450ms)
✓ Request-Request-Remote (559ms)
✓ Request-Request-Internal (663ms)
5) Request-Syscheck-Syscheck
✓ Request-Syscheck-Rootcheck (724ms)
✓ Request-Syscheck-Internal (627ms)
✓ Request-Wmodules-Wmodules (657ms)
137 passing (1m)
5 failing
1) Agents
GET/agents
Sort:
Uncaught AssertionError: expected Object {
os: Object {
arch: 'x86_64',
codename: 'Core',
major: '7',
name: 'CentOS Linux',
platform: 'centos',
uname: 'Linux |agent-outdated |3.10.0-862.14.4.el7.x86_64 |#1 SMP Wed Sep 26 15:12:11 UTC 2018 |x86_64',
version: '7'
},
version: 'Wazuh v3.5.0',
lastKeepAlive: '2019-02-19 16:02:55',
registerIP: '172.19.0.209',
status: 'Active',
group: Array [ 'default' ],
node_name: 'worker-1',
ip: '172.19.0.209',
id: '003',
manager: 'worker-1',
name: 'agent-outdated',
dateAdd: '2019-02-19 15:40:26',
mergedSum: '94c34f36719a4f32180b427b022f71da'
} to have property configSum
at Assertion.fail (node_modules/should/cjs/should.js:258:17)
at Assertion.value [as properties] (node_modules/should/cjs/should.js:335:19)
at Test.<anonymous> (test/test_agents.js:102:52)
at Test.assert (node_modules/supertest/lib/test.js:179:6)
at assert (node_modules/supertest/lib/test.js:131:12)
at /home/vagrant/wazuh-api/node_modules/supertest/lib/test.js:128:5
at Test.Request.callback (node_modules/superagent/lib/node/index.js:619:12)
at /home/vagrant/wazuh-api/node_modules/superagent/lib/node/index.js:795:18
at IncomingMessage.<anonymous> (node_modules/superagent/lib/node/parsers/json.js:16:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
2) Agents
POST/agents/groups/:group_id/files/:file_name
TooBigXML:
Uncaught AssertionError: expected '701' to be 701
at Assertion.fail (node_modules/should/cjs/should.js:258:17)
at Assertion.value (node_modules/should/cjs/should.js:335:19)
at Test.<anonymous> (test/test_agents.js:1108:39)
at Test.assert (node_modules/supertest/lib/test.js:179:6)
at assert (node_modules/supertest/lib/test.js:131:12)
at /home/vagrant/wazuh-api/node_modules/supertest/lib/test.js:128:5
at Test.Request.callback (node_modules/superagent/lib/node/index.js:631:3)
at /home/vagrant/wazuh-api/node_modules/superagent/lib/node/index.js:795:18
at IncomingMessage.<anonymous> (node_modules/superagent/lib/node/parsers/json.js:16:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
3) Agents
GET/agents/groups/:group_id/configuration
Request:
Uncaught AssertionError: expected Object {} to have property localfile
at Assertion.fail (node_modules/should/cjs/should.js:258:17)
at Assertion.value [as properties] (node_modules/should/cjs/should.js:335:19)
at Test.<anonymous> (test/test_agents.js:1492:59)
at Test.assert (node_modules/supertest/lib/test.js:179:6)
at assert (node_modules/supertest/lib/test.js:131:12)
at /home/vagrant/wazuh-api/node_modules/supertest/lib/test.js:128:5
at Test.Request.callback (node_modules/superagent/lib/node/index.js:619:12)
at /home/vagrant/wazuh-api/node_modules/superagent/lib/node/index.js:795:18
at IncomingMessage.<anonymous> (node_modules/superagent/lib/node/parsers/json.js:16:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
4) Agents
POST/agents/groups/:group_id/configuration
TooBigXML:
Uncaught AssertionError: expected '701' to be 701
at Assertion.fail (node_modules/should/cjs/should.js:258:17)
at Assertion.value (node_modules/should/cjs/should.js:335:19)
at Test.<anonymous> (test/test_agents.js:1843:39)
at Test.assert (node_modules/supertest/lib/test.js:179:6)
at assert (node_modules/supertest/lib/test.js:131:12)
at /home/vagrant/wazuh-api/node_modules/supertest/lib/test.js:128:5
at Test.Request.callback (node_modules/superagent/lib/node/index.js:631:3)
at /home/vagrant/wazuh-api/node_modules/superagent/lib/node/index.js:795:18
at IncomingMessage.<anonymous> (node_modules/superagent/lib/node/parsers/json.js:16:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
5) Agents
GET/agents/:agent/config/:component/:configuration
Request-Syscheck-Syscheck:
Uncaught AssertionError: expected Object {
disabled: 'no',
frequency: 43200,
skip_nfs: 'yes',
scan_on_start: 'yes',
directories: Array [
Object {
opts: Array [
'check_md5sum',
'check_sha1sum',
'check_perm',
'check_size',
'check_owner',
'check_group',
'check_mtime',
'check_inode',
'check_sha256sum'
],
dir: '/etc',
recursion_level: 256
},
Object {
opts: Array [
'check_md5sum',
'check_sha1sum',
'check_perm',
'check_size',
'check_owner',
'check_group',
'check_mtime',
'check_inode',
'check_sha256sum'
],
dir: '/usr/bin',
recursion_level: 256
},
Object {
opts: Array [
'check_md5sum',
'check_sha1sum',
'check_perm',
'check_size',
'check_owner',
'check_group',
'check_mtime',
'check_inode',
'check_sha256sum'
],
dir: '/usr/sbin',
recursion_level: 256
},
Object {
opts: Array [
'check_md5sum',
'check_sha1sum',
'check_perm',
'check_size',
'check_owner',
'check_group',
'check_mtime',
'check_inode',
'check_sha256sum'
],
dir: '/bin',
recursion_level: 256
},
Object {
opts: Array [
'check_md5sum',
'check_sha1sum',
'check_perm',
'check_size',
'check_owner',
'check_group',
'check_mtime',
'check_inode',
'check_sha256sum'
],
dir: '/sbin',
recursion_level: 256
},
Object {
opts: Array [
'check_md5sum',
'check_sha1sum',
'check_perm',
'check_size',
'check_owner',
'check_group',
'check_mtime',
'check_inode',
'check_sha256sum'
],
dir: '/boot',
recursion_level: 256
}
],
nodiff: Array [ '/etc/ssl/private.key' ],
ignore: Array [
'/etc/mtab',
'/etc/hosts.deny',
'/etc/mail/statistics',
'/etc/random-seed',
'/etc/random.seed',
'/etc/adjtime',
'/etc/httpd/logs',
'/etc/utmpx',
'/etc/wtmpx',
'/etc/cups/certs',
'/etc/dumpdates',
'/etc/svc/volatile',
'/sys/kernel/security',
'/sys/kernel/debug'
],
whodata: Object { restart_audit: 'yes', startup_healthcheck: 'yes' }
} to have property restart_audit
at Assertion.fail (node_modules/should/cjs/should.js:258:17)
at Assertion.value [as properties] (node_modules/should/cjs/should.js:335:19)
at Test.<anonymous> (test/test_agents.js:2865:52)
at Test.assert (node_modules/supertest/lib/test.js:179:6)
at assert (node_modules/supertest/lib/test.js:131:12)
at /home/vagrant/wazuh-api/node_modules/supertest/lib/test.js:128:5
at Test.Request.callback (node_modules/superagent/lib/node/index.js:619:12)
at /home/vagrant/wazuh-api/node_modules/superagent/lib/node/index.js:795:18
at IncomingMessage.<anonymous> (node_modules/superagent/lib/node/parsers/json.js:16:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
Errors caused by AppApp
Authentication
✓ Wrong USER (56ms)
✓ Wrong password
✓ Home (48ms)
Requests
✓ Inexistent request
✓ API version
5 passing (184ms) ClusterCluster
GET/cluster/nodes
✓ Request (286ms)
✓ Pagination (264ms)
✓ Retrieve all elements with limit=0 (288ms)
✓ Sort (254ms)
✓ Search (236ms)
✓ Filters: type (249ms)
✓ Filters: invalid type (238ms)
✓ Select (242ms)
✓ Select 2 (262ms)
✓ Wrong select (246ms)
GET/cluster/:node_id/stats
✓ Cluster stats (209ms)
✓ Unexisting node stats (234ms)
✓ Analysisd stats (259ms)
✓ Remoted stats (298ms)
GET/cluster/nodes/:node_name
✓ Request (200ms)
✓ Request wrong name (259ms)
GET/cluster/status
✓ Request (233ms)
GET/cluster/config
✓ Request (246ms)
GET/cluster/healthcheck
✓ Request (200ms)
✓ Filter: node name (262ms)
POST/cluster/:node_id/files
✓ Upload ossec.conf (master) (228ms)
✓ Upload ossec.conf (worker) (349ms)
✓ Upload rules (266ms)
✓ Upload decoder (259ms)
✓ Upload list (251ms)
✓ Upload corrupted ossec.conf (master)
✓ Upload corrupted ossec.conf (worker)
✓ Upload malformed rules
✓ Upload rules to unexisting node (221ms)
✓ Upload malformed decoder
✓ Upload decoder to unexisting node (267ms)
✓ Upload malformed list
✓ Upload list to unexisting node (232ms)
GET/cluster/:node_id/files
✓ Request ossec.conf (master) (254ms)
✓ Request ossec.conf (worker) (270ms)
✓ Request rules (249ms)
✓ Request decoders (256ms)
✓ Request lists (283ms)
✓ Request wrong path 1
✓ Request wrong path 2
✓ Request wrong path 3 (47ms)
✓ Request unexisting file (211ms)
✓ Request file from unexisting node (260ms)
GET/cluster/:node_id/configuration/validation (manager and worker OK)
✓ Request validation (master) (447ms)
✓ Request validation (worker) (438ms)
✓ Request validation (all nodes) (440ms)
GET/cluster/:node_id/configuration/validation (manager KO, worker OK)
✓ Request validation (master) (193ms)
✓ Request validation (worker) (414ms)
✓ Request validation (all nodes) (450ms)
GET/cluster/:node_id/configuration/validation (manager OK, worker KO)
✓ Request validation (master) (363ms)
✓ Request validation (worker) (249ms)
✓ Request validation (all nodes) (425ms)
GET/cluster/:node_id/configuration/validation (manager and worker KO)
✓ Request validation (master) (212ms)
✓ Request validation (worker) (291ms)
✓ Request validation (all nodes) (247ms)
PUT/cluster/:node_id/restart
✓ Request (worker) (267ms)
✓ Request (master) (283ms)
57 passing (17s) Configuration AssessmentConfigurationAssessment
GET/configuration-assessment/:agent_id
✓ Request (379ms)
✓ Pagination (273ms)
✓ Retrieve all elements with limit=0 (240ms)
✓ Sort (270ms)
✓ Search (254ms)
✓ Params: Bad agent id
✓ Errors: No agent (248ms)
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field
✓ Filters: query (235ms)
✓ Retrieve all elements with limit=0 (255ms)
GET/configuration-assessment/:agent_id/checks/:policy_id
✓ Request (242ms)
✓ Pagination (236ms)
✓ Retrieve all elements with limit=0 (302ms)
✓ Sort (244ms)
✓ Search (263ms)
✓ Params: Bad agent id
✓ Errors: No agent (230ms)
✓ Check not found (258ms)
✓ Retrieve all elements with limit=0 (238ms)
20 passing (4s) DecodersDecoders
GET/decoders
✓ Request (619ms)
✓ Pagination (309ms)
✓ Retrieve all elements with limit=0 (438ms)
✓ Sort (454ms)
✓ Search (410ms)
✓ Filters: File (465ms)
✓ Filters: Path (317ms)
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field
GET/decoders/files
✓ Request (312ms)
✓ Pagination (315ms)
✓ Retrieve all elements with limit=0 (478ms)
✓ Sort (319ms)
✓ Search (323ms)
GET/decoders/parents
✓ Request (301ms)
✓ Pagination (300ms)
✓ Retrieve all elements with limit=0 (319ms)
✓ Sort (290ms)
✓ Search (284ms)
GET/decoders/:decoder_name
✓ Request (262ms)
✓ Pagination (295ms)
✓ Retrieve all elements with limit=0 (337ms)
✓ Sort (285ms)
✓ Search (254ms)
24 passing (8s) ListsLists
GET/lists
✓ Request (255ms)
✓ Pagination (246ms)
✓ Retrieve all elements with limit=0 (294ms)
✓ Sort (247ms)
✓ Search (228ms)
✓ Filters: Path (228ms)
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field
GET/lists/files
✓ Request (244ms)
✓ Pagination (224ms)
✓ Retrieve all elements with limit=0 (243ms)
✓ Sort (228ms)
✓ Search (229ms)
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field
15 passing (3s) ManagerManager
GET/manager/status
✓ Request (430ms)
GET/manager/info
✓ Request (265ms)
GET/manager/configuration
✓ Request (271ms)
✓ Filters: Missing field section
✓ Filters: Section (615ms)
✓ Errors: Invalid Section (284ms)
✓ Filters: Section - field (322ms)
✓ Errors: Invalid field (249ms)
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field
GET/manager/stats
✓ Request (228ms)
✓ Filters: date (356ms)
✓ Filters: Invalid date
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field
GET/manager/stats/hourly
✓ Request (205ms)
GET/manager/stats/weekly
✓ Request (226ms)
GET/manager/stats/analysisd
✓ Request (281ms)
GET/manager/stats/remoted
✓ Request (242ms)
GET/manager/logs
✓ Request (327ms)
✓ Pagination (306ms)
✓ Retrieve all elements with limit=0 (322ms)
✓ Sort (289ms)
✓ SortField (289ms)
✓ Search (366ms)
✓ Filters: type_log (300ms)
✓ Filters: category (289ms)
✓ Filters: type_log and category (328ms)
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field
GET/manager/logs/summary
✓ Request (306ms)
POST/manager/files
✓ Upload ossec.conf (219ms)
✓ Upload rules (247ms)
✓ Upload decoder (255ms)
✓ Upload list (239ms)
✓ Upload malformed rule
✓ Upload malformed decoder
✓ Upload malformed list
GET/manager/files
✓ Request ossec.conf (286ms)
✓ Request rules (259ms)
✓ Request decoders (239ms)
✓ Request lists (246ms)
✓ Request wrong path 1
✓ Request wrong path 2
✓ Request wrong path 3
✓ Request unexisting file (260ms)
GET/manager/configuration/validation (OK)
✓ Request validation (479ms)
GET/manager/configuration/validation (KO)
✓ Request validation (master) (207ms)
PUT/manager/restart
✓ Request (421ms)
49 passing (12s) RootcheckRootcheck
GET/rootcheck/:agent_id/last_scan
✓ Request (782ms)
✓ Params: Bad agent id
✓ Errors: No agent (262ms)
DELETE/rootcheck/:agent_id
✓ Request (313ms)
✓ Params: Bad agent id
✓ Errors: No agent (279ms)
DELETE/rootcheck
✓ Request (650ms)
PUT/rootcheck/:agent_id
✓ Request (259ms)
✓ Params: Bad agent id
✓ Errors: No agent (264ms)
PUT/rootcheck
✓ Request (284ms)
11 passing (3s) RulesRules
GET/rules
✓ Request (755ms)
✓ Pagination (627ms)
✓ Retrieve all elements with limit=0 (348ms)
✓ Sort (324ms)
✓ Search (392ms)
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field (56ms)
✓ Filters: status (548ms)
✓ Filters: group (608ms)
✓ Filters: level (1) (702ms)
✓ Filters: level (2) (927ms)
✓ Filters: path (711ms)
✓ Filters: file (829ms)
✓ Filters: pci (879ms)
✓ Filters: gdpr (593ms)
GET/rules/groups
✓ Request (387ms)
✓ Pagination (325ms)
✓ Retrieve all elements with limit=0 (450ms)
✓ Sort (365ms)
✓ Search (411ms)
✓ Filters: Invalid filter
GET/rules/pci
✓ Request (319ms)
✓ Pagination (414ms)
✓ Retrieve all elements with limit=0 (325ms)
✓ Sort (316ms)
✓ Search (319ms)
✓ Filters: Invalid filter
GET/rules/gdpr
✓ Request (429ms)
✓ Pagination (391ms)
✓ Retrieve all elements with limit=0 (495ms)
✓ Sort (392ms)
✓ Search (538ms)
✓ Filters: Invalid filter
GET/rules/files
✓ Request (297ms)
✓ Pagination (255ms)
✓ Retrieve all elements with limit=0 (344ms)
✓ Sort (473ms)
✓ Search (476ms)
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field
✓ Filters: status (530ms)
✓ Filters: download (587ms)
GET/rules/:rule_id
✓ Request (456ms)
✓ Pagination (484ms)
✓ Retrieve all elements with limit=0 (333ms)
✓ Sort (329ms)
✓ Search (396ms)
✓ Filters: Invalid filter
✓ Params: Bad rule id
✓ Params: No rule (408ms)
50 passing (20s) SyscheckSyscheck
GET/syscheck/:agent_id
✓ Request (355ms)
✓ Pagination (238ms)
✓ Retrieve all elements with limit=0 (257ms)
✓ Sort (303ms)
✓ Search (311ms)
✓ Params: Bad agent id (48ms)
✓ Errors: No agent (243ms)
✓ Filters: Invalid filter
✓ Filters: Invalid filter - Extra field (48ms)
✓ Filters: file (269ms)
✓ Filters: type (255ms)
✓ Filters: summary (275ms)
✓ Filters: md5 (353ms)
✓ Filters: sha1 (299ms)
✓ Filters: sha256 (299ms)
✓ Filters: hash (421ms)
GET/syscheck/:agent_id/last_scan
✓ Request (396ms)
✓ Params: Bad agent id
✓ Errors: No agent (311ms)
DELETE/syscheck/:agent_id
✓ Request (396ms)
✓ Params: Bad agent id
✓ Errors: No agent (396ms)
DELETE/experimental/syscheck
✓ Request (417ms)
PUT/syscheck/:agent_id
✓ Request (308ms)
✓ Params: Bad agent id
✓ Errors: No agent (298ms)
PUT/syscheck
✓ Request (382ms)
27 passing (7s) SyscollectorSyscollector
GET/syscollector/:agent_id/os
✓ Request (359ms)
✓ Selector (331ms)
✓ Not allowed selector (304ms)
GET/syscollector/:agent_id/hardware
✓ Request (343ms)
✓ Selector (313ms)
✓ Not allowed selector (348ms)
GET/syscollector/:agent_id/packages
✓ Request (316ms)
✓ Selector (306ms)
✓ Not allowed selector (335ms)
✓ Pagination (318ms)
✓ Wrong limit
✓ Sort - (272ms)
✓ Sort + (398ms)
✓ Wrong Sort (484ms)
✓ Search (594ms)
✓ Filter: vendor (523ms)
✓ Filter: name (441ms)
✓ Filter: architecture (648ms)
✓ Filter: format (546ms)
✓ Wrong filter (54ms)
GET/experimental/syscollector/packages
✓ Request (350ms)
✓ Selector (387ms)
✓ Not allowed selector (308ms)
✓ Pagination (275ms)
✓ Wrong limit
✓ Sort - (300ms)
✓ Sort + (384ms)
✓ Wrong Sort (294ms)
✓ Search (333ms)
✓ Filter: vendor (481ms)
✓ Filter: name (412ms)
✓ Filter: architecture (494ms)
✓ Filter: format (449ms)
✓ Wrong filter
GET/experimental/syscollector/os
✓ Request (261ms)
✓ Selector (363ms)
✓ Not allowed selector (313ms)
✓ Pagination (385ms)
✓ Wrong limit
✓ Search (384ms)
✓ Wrong filter (48ms)
✓ Filter: architecture (347ms)
✓ Filter: os_name (392ms)
✓ Filter: release (321ms)
GET/experimental/syscollector/hardware
✓ Request (268ms)
✓ Selector (281ms)
✓ Not allowed selector (448ms)
✓ Pagination (346ms)
✓ Wrong limit
✓ Search (332ms)
✓ Wrong filter
✓ Wrong Sort (290ms)
✓ Filter: ram_total (419ms)
✓ Filter: cpu_cores (446ms)
✓ Filter: cpu_mhz (473ms)
✓ Filter: board_serial (342ms)
GET/experimental/syscollector/processes
✓ Request (356ms)
✓ Selector (418ms)
✓ Not allowed selector (312ms)
✓ Pagination (302ms)
✓ Wrong limit
✓ Search (394ms)
✓ Wrong filter (58ms)
✓ Wrong Sort (296ms)
✓ Filter: state (289ms)
✓ Filter: ppid (323ms)
✓ Filter: egroup (379ms)
✓ Filter: euser (511ms)
✓ Filter: fgroup (530ms)
✓ Filter: name (327ms)
✓ Filter: nlwp (250ms)
✓ Filter: pgrp (294ms)
✓ Filter: priority (295ms)
✓ Filter: rgroup (296ms)
✓ Filter: ruser (422ms)
✓ Filter: sgroup (348ms)
✓ Filter: suser (303ms)
GET/experimental/syscollector/ports
✓ Request (256ms)
✓ Selector (314ms)
✓ Not allowed selector (331ms)
✓ Pagination (333ms)
✓ Wrong limit
✓ Search (382ms)
✓ Wrong filter
✓ Wrong Sort (366ms)
✓ Filter: protocol (296ms)
✓ Filter: local_ip (304ms)
✓ Filter: local_port (314ms)
✓ Filter: remote_ip (352ms)
✓ Filter: tx_queue (334ms)
✓ Filter: state (327ms)
GET/syscollector/netaddr
✓ Request (255ms)
✓ Selector (287ms)
✓ Not allowed selector (401ms)
✓ Pagination (482ms)
✓ Wrong limit
✓ Search (516ms)
✓ Wrong filter
✓ Wrong Sort (537ms)
1) Filter: iface
✓ Filter: proto (513ms)
✓ Filter: address (555ms)
✓ Filter: broadcast (399ms)
✓ Filter: netmask (307ms)
GET/experimental/syscollector/netproto
✓ Request (249ms)
✓ Selector (286ms)
✓ Not allowed selector (269ms)
✓ Pagination (288ms)
✓ Wrong limit
✓ Search (300ms)
✓ Wrong filter
✓ Wrong Sort (278ms)
✓ Filter: iface (363ms)
✓ Filter: type (291ms)
✓ Filter: gateway (278ms)
✓ Filter: dhcp (273ms)
GET/experimental/syscollector/netiface
✓ Request (770ms)
✓ Selector (572ms)
✓ Not allowed selector (363ms)
✓ Pagination (507ms)
✓ Wrong limit
✓ Search (421ms)
✓ Wrong filter
✓ Wrong Sort (404ms)
✓ Filter: name (356ms)
✓ Filter: type (372ms)
✓ Filter: state (358ms)
✓ Filter: mtu (335ms)
✓ Filter: tx_packets (345ms)
✓ Filter: rx_packets (303ms)
✓ Filter: tx_bytes (299ms)
✓ Filter: rx_bytes (324ms)
✓ Filter: tx_errors (315ms)
✓ Filter: rx_errors (331ms)
✓ Filter: tx_dropped (370ms)
✓ Filter: rx_dropped (349ms)
GET/syscollector/000/processes
✓ Request (282ms)
✓ Selector (367ms)
✓ Not allowed selector (305ms)
✓ Pagination (313ms)
✓ Wrong limit
✓ Search (305ms)
✓ Wrong filter
✓ Wrong Sort (275ms)
✓ Filter: state (244ms)
✓ Filter: ppid (237ms)
✓ Filter: egroup (326ms)
✓ Filter: euser (287ms)
✓ Filter: fgroup (349ms)
✓ Filter: name (299ms)
✓ Filter: nlwp (258ms)
✓ Filter: pgrp (256ms)
✓ Filter: priority (286ms)
✓ Filter: rgroup (268ms)
✓ Filter: ruser (299ms)
✓ Filter: sgroup (292ms)
✓ Filter: suser (323ms)
GET/syscollector/000/ports
✓ Request (206ms)
✓ Selector (276ms)
✓ Not allowed selector (312ms)
✓ Pagination (404ms)
✓ Wrong limit
✓ Search (315ms)
✓ Wrong filter
✓ Wrong Sort (254ms)
✓ Filter: protocol (276ms)
✓ Filter: local_ip (239ms)
✓ Filter: local_port (241ms)
✓ Filter: remote_ip (270ms)
✓ Filter: tx_queue (241ms)
✓ Filter: state (260ms)
GET/syscollector/000/netaddr
✓ Request (206ms)
✓ Selector (221ms)
✓ Not allowed selector (239ms)
✓ Pagination (259ms)
✓ Wrong limit
✓ Search (249ms)
✓ Wrong filter
✓ Wrong Sort (258ms)
✓ Filter: iface (241ms)
✓ Filter: proto (244ms)
✓ Filter: address (276ms)
✓ Filter: broadcast (243ms)
✓ Filter: netmask (258ms)
GET/syscollector/000/netproto
✓ Request (241ms)
✓ Selector (241ms)
✓ Not allowed selector (237ms)
✓ Pagination (256ms)
✓ Wrong limit (44ms)
✓ Search (236ms)
✓ Wrong filter
✓ Wrong Sort (252ms)
✓ Filter: iface (240ms)
✓ Filter: type (273ms)
✓ Filter: gateway (241ms)
✓ Filter: dhcp (245ms)
GET/syscollector/000/netiface
✓ Request (269ms)
✓ Selector (267ms)
✓ Not allowed selector (274ms)
✓ Pagination (292ms)
✓ Wrong limit
✓ Search (356ms)
✓ Wrong filter
✓ Wrong Sort (254ms)
✓ Filter: name (239ms)
✓ Filter: type (244ms)
✓ Filter: state (244ms)
✓ Filter: mtu (250ms)
✓ Filter: tx_packets (271ms)
✓ Filter: rx_packets (437ms)
✓ Filter: tx_bytes (317ms)
✓ Filter: rx_bytes (289ms)
✓ Filter: tx_errors (382ms)
✓ Filter: rx_errors (370ms)
✓ Filter: tx_dropped (439ms)
✓ Filter: rx_dropped (443ms)
215 passing (1m)
1 failing
1) Syscollector
GET/syscollector/netaddr
Filter: iface:
Error: expected 200 "OK", got 400 "Bad Request"
at Test._assertStatus (/home/vagrant/node_modules/supertest/lib/test.js:268:12)
at Test._assertFunction (/home/vagrant/node_modules/supertest/lib/test.js:283:11)
at Test.assert (/home/vagrant/node_modules/supertest/lib/test.js:173:18)
at localAssert (/home/vagrant/node_modules/supertest/lib/test.js:131:12)
at /home/vagrant/node_modules/supertest/lib/test.js:128:5
at Test.Request.callback (/home/vagrant/node_modules/superagent/lib/node/index.js:728:3)
at parser (/home/vagrant/node_modules/superagent/lib/node/index.js:916:18)
at IncomingMessage.res.on (/home/vagrant/node_modules/superagent/lib/node/parsers/json.js:19:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9) There is an issue for error in |
I found a error in |
Ruleset test
Installation
Configuration
Calls
Certificates and HTTPS
Test mocha
Required tests:
Checks:
The text was updated successfully, but these errors were encountered: