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

Add new service check oracle.can_query #10004

Merged
merged 13 commits into from
Sep 1, 2021
Merged

Add new service check oracle.can_query #10004

merged 13 commits into from
Sep 1, 2021

Conversation

yzhan289
Copy link
Contributor

@yzhan289 yzhan289 commented Aug 27, 2021

What does this PR do?

This PR does two things:

  • Add new service check oracle.can_query
  • Reformat tests by the type of test by turning test_oracle and test_metrics into test_unit

The original oracle.can_connect service check emitted OK if the integration can connect to the database and if all of the queries can be run.

This PR adds a new service check oracle.can_query to split up the original service check. Now, oracle.can_connect checks if the integration can connect to the oracle database, and oracle.can_query checks if all of the queries can be run.

Motivation

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@codecov
Copy link

codecov bot commented Aug 27, 2021

Codecov Report

Merging #10004 (ff6f185) into master (9a7e34a) will increase coverage by 0.00%.
The diff coverage is 98.13%.

Flag Coverage Δ
oracle 93.65% <98.13%> (+0.93%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@yzhan289 yzhan289 changed the title Az/oracle Add new service check oracle.can_query Aug 27, 2021
fanny-jiang
fanny-jiang previously approved these changes Aug 27, 2021
oracle/assets/service_checks.json Outdated Show resolved Hide resolved
aggregator.assert_service_check("oracle.can_query", check.CRITICAL, count=1, tags=expected_tags)


def test__get_connection_instant_client_server_incorrect_formatting(instance, dd_run_check, aggregator):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sarah-witt This is the same test that you added in #9971, just renamed and using aggregator to assert service check.

ofek
ofek previously approved these changes Sep 1, 2021
@yzhan289 yzhan289 merged commit 9f83705 into master Sep 1, 2021
@yzhan289 yzhan289 deleted the az/oracle branch September 1, 2021 20:52
github-actions bot pushed a commit that referenced this pull request Sep 1, 2021
* Rename tests for oracle

* Add new service check logic

* Add new unit tests for service check changes

* Add new service check can_query

* Fix old unit test

* Modify e2e tests

* Fix style

* Add service check to json

* Fix name

* Apply suggestions from code review

Co-authored-by: Ofek Lev <ofekmeister@gmail.com>

* Reformat newly added test

* Reformat tests

* Add host for service check:

Co-authored-by: Ofek Lev <ofekmeister@gmail.com> 9f83705
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.

None yet

3 participants