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

System test for elasticsearch module, xpack code path #12482

Merged
merged 3 commits into from
Jun 17, 2019
Merged

System test for elasticsearch module, xpack code path #12482

merged 3 commits into from
Jun 17, 2019

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Jun 8, 2019

Related: #12256.

This PR introduced a system test to exercise the xpack code path (xpack.enabled: true) of the Elasticsearch Metricbeat module. The existing system test is refactored a bit to re-use code.

Testing this PR

  1. Activate the virtual env for system tests.

    cd metricbeat
    . build/python-env/bin/activate
    
  2. Build the test binary.

    make metricbeat.test
    
  3. Run the integration tests

    INTEGRATION_TESTS=1  nosetests -v --nocapture module/elasticsearch/test_elasticsearch.py
    
  4. Assert that there are no errors.

@ycombinator ycombinator requested review from a team as code owners June 8, 2019 14:36
@ycombinator
Copy link
Contributor Author

This PR's CI build will fail because the new system test introduced in this PR is failing (yay!?). I will keep this PR open and open other PRs to fix the failures being identified by this new test.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/stack-monitoring

Copy link
Contributor

@cachedout cachedout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ycombinator
Copy link
Contributor Author

First bug caught by these tests: #12487.

@ycombinator ycombinator requested a review from ruflin June 11, 2019 19:04
@ycombinator ycombinator added needs_backport PR is waiting to be backported to other branches. review v7.3.0 v8.0.0 labels Jun 11, 2019
Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(as soon as it is green ;-) )


self.render_config_template(modules=[{
"name": "elasticsearch",
"metricsets": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like this could get out of date pretty quickly. I wonder if you want to generate this list somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One option, although a bit hacky, could be to look for metricset folders that have data_xpack.go in them. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. Also ok to get it in as is for now and follow up on this improvement.

@ycombinator
Copy link
Contributor Author

ycombinator commented Jun 12, 2019

Second bug caught by these tests: #12511.

@ycombinator
Copy link
Contributor Author

jenkins, test this

1 similar comment
@ycombinator
Copy link
Contributor Author

jenkins, test this

@ycombinator ycombinator merged commit d8d48fc into elastic:master Jun 17, 2019
@ycombinator ycombinator deleted the mb-es-xp-system-test branch December 25, 2019 11:18
@ycombinator ycombinator removed the needs_backport PR is waiting to be backported to other branches. label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants