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

test: add an exported constructor for QueryTableResult #304

Merged

Conversation

jaymebrd
Copy link
Contributor

@jaymebrd jaymebrd commented Feb 1, 2022

Proposed Changes

| recently added an Influx Integration to another system and it was difficult to mock QueryTableResult so thought I'd make a PR to improve that.

QueryTableResult is a struct with private unexported fields, so
mocking this in external tests when the Influx client is used is
difficult. This adds an exported constructor to make external mocking
and testing easier.

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • Tests pass
  • Commit messages are in semantic format
  • Sign CLA (if not already signed)

QueryTableResult is a struct with private unexported fields, so
mocking this in external tests when the Influx client is used is
difficult. This adds an exported constructor to make external mocking
and testing easier.
Copy link
Contributor

@vlastahajek vlastahajek left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. This change really makes sense.

@vlastahajek vlastahajek merged commit ffda294 into master Feb 3, 2022
@vlastahajek vlastahajek deleted the test/add-exported-constructor-for-QueryTableResult branch February 16, 2022 19:43
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.

None yet

2 participants