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

Dev mocha alerts #885

Merged
merged 11 commits into from Sep 14, 2018
Merged

Dev mocha alerts #885

merged 11 commits into from Sep 14, 2018

Conversation

jesusgn90
Copy link
Contributor

Hello team, this PR implements basic Mocha tests to check alerts structure for main default tabs.

There are indices:

  it('GET /_cat/indices', async () => {
    const res = await needle('get', `localhost:9200/_cat/indices`, {}, headers);
    res.statusCode.should.be.eql(200);
    res.body.should.be.a('string');
  });

There is an index for today:

  it(`GET /_cat/indices/${index}`, async () => {
    const res = await needle(
      'get',
      `localhost:9200/_cat/indices/${index}`,
      {},
      headers
    );
    res.statusCode.should.be.eql(200);
    res.body.should.be.a('string');
  });

A few of checks for 000 alerts:

  describe('Manager (agent.id: 000)', () => {
    it(`GET /${index}/_search - vulnerability-detector`, async () =>
      vulnerability('000'));
    it(`GET /${index}/_search - syscheck`, async () => syscheck('000'));
    it(`GET /${index}/_search - rootcheck`, async () => rootcheck('000'));
    it(`GET /${index}/_search - pci_dss`, async () => pciDss('000'));
    it(`GET /${index}/_search - gdpr`, async () => gdpr('000'));
    it(`GET /${index}/_search - audit`, async () => audit('000'));
  });

A few of checks for 001 alerts:

  describe('Agent (agent.id: 001)', () => {
    it(`GET /${index}/_search - vulnerability-detector`, async () =>
      vulnerability('001'));
    it(`GET /${index}/_search - syscheck`, async () => syscheck('001'));
    it(`GET /${index}/_search - rootcheck`, async () => rootcheck('001'));
    it(`GET /${index}/_search - pci_dss`, async () => pciDss('001'));
    it(`GET /${index}/_search - gdpr`, async () => gdpr('001'));
    it(`GET /${index}/_search - audit`, async () => audit('001'));
  });

@jesusgn90 jesusgn90 self-assigned this Sep 10, 2018
@jesusgn90 jesusgn90 added this to Pending feature in Revision 415 via automation Sep 10, 2018
@jesusgn90
Copy link
Contributor Author

Closes #869

@jesusgn90 jesusgn90 merged commit ee598c4 into 3.6-6.4 Sep 14, 2018
Revision 415 automation moved this from Pending feature to Feature testing Sep 14, 2018
@jesusgn90 jesusgn90 deleted the dev-mocha-alerts branch September 14, 2018 05:04
@JuanjiJG JuanjiJG moved this from Feature testing to Done in Revision 415 Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Revision 415
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant