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

refactor(metadata-io/test): common ElasticsearchContainer and ability to override from environment. #4152

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

stephenp-gr
Copy link
Contributor

@stephenp-gr stephenp-gr commented Feb 15, 2022

refactor(metadata-io/test): create common ElasticsearchContainer helper and ability to override from environment.

Add ElasticTestUtils to provide a common place to construct ElasticsearchContainer and create REST clients. This is to remove code duplication in tests, to ensure tests are against a consistent image of Elasticsearch. Also included is the ability to use an environment variable to override the container full name, this is to allow builds behind a firewall to specify internal source for the image.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

Add a test helper to introduce a common place to construct ElasticsearchContainer. To reduce duplication in tests and to allow environment variables to override the container full name. This is to allow builds behind a firewall to select the repo to use.
Copy link
Contributor

@dexter-mh-lee dexter-mh-lee left a comment

Choose a reason for hiding this comment

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

Thanks a lot!!! This looks great

@github-actions
Copy link

github-actions bot commented Feb 16, 2022

Unit Test Results (build & test)

  70 files    70 suites   15m 21s ⏱️
609 tests 550 ✔️ 59 💤 0

Results for commit 32b98a2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@shirshanka shirshanka left a comment

Choose a reason for hiding this comment

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

Thank you!

@shirshanka shirshanka merged commit fb80e6b into datahub-project:master Feb 17, 2022
hevandro-veiga pushed a commit to hevandro-veiga/datahub that referenced this pull request Feb 18, 2022
maggiehays pushed a commit to maggiehays/datahub that referenced this pull request Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants