Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

tests: add system tests to check error details#1076

Merged
atulep merged 21 commits into
googleapis:masterfrom
atulep:error_details
Nov 10, 2021
Merged

tests: add system tests to check error details#1076
atulep merged 21 commits into
googleapis:masterfrom
atulep:error_details

Conversation

@atulep

@atulep atulep commented Nov 8, 2021

Copy link
Copy Markdown
Contributor

System tests to check error details added in googleapis/python-api-core#286.

@atulep atulep requested review from a team November 8, 2021 17:52
@atulep atulep changed the title Adds system tests to check error details. feat: Adds system tests to check error details. Nov 8, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 8, 2021
@atulep

atulep commented Nov 8, 2021

Copy link
Copy Markdown
Contributor Author

The commit history in this PR is misleading. It contains some of my older commits unrelated to this PR. Any ideas how to fix it?

@tseaver tseaver changed the title feat: Adds system tests to check error details. tests: add system tests to check error details Nov 8, 2021
Comment thread tests/system/test_error_details.py Outdated

@tseaver tseaver left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In addition to my comments inline, two things:

  • These are unit tests, not system tests (they don't exercise actual over-the-wire API calls).
  • They belong in python-api-core, not in this repository.

Comment thread tests/system/test_error_details.py Outdated
Comment thread tests/system/test_error_details.py
@tseaver tseaver added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 8, 2021
@tseaver

tseaver commented Nov 8, 2021

Copy link
Copy Markdown
Contributor

@atulep For future reference, you can rebase your branch against main (e.g., git rebase main) to clean up the previous history.

@atulep

atulep commented Nov 8, 2021

Copy link
Copy Markdown
Contributor Author

In addition to my comments inline, two things:

  • These are unit tests, not system tests (they don't exercise actual over-the-wire API calls).
  • They belong in python-api-core, not in this repository.

@tseaver
Tests send API requests to showcase server and assert errors returned from real server response.

We want gapic clients to have access to error.details, so we should test it here. Additionally,python-api-core doesn't have any existing infrastructure for system tests, which suggested to me it's not a suitable place.

@tseaver

tseaver commented Nov 8, 2021

Copy link
Copy Markdown
Contributor

@atulep I apologize -- I somehow missed seeing that these tests use the echo fixture.

Please do rebase your branch against the current main and force push, e.g.:

$ git fetch --all --prune
$ git checkout main
$ git checkout error_details
$ git rebase main
$ git push -f origin error_details

I would also avoid re-using a branch after merging its PR.

@atulep

atulep commented Nov 9, 2021

Copy link
Copy Markdown
Contributor Author

@tseaver, I followed your script, but it gave me:

$ git rebase master
Current branch error_details is up to date.

Maybe it's easier to start a fresh PR with correct history.

@summer-ji-eng summer-ji-eng left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's not blocker, but please add a test case for error_info once the feature merged.

Thank you very much. :)

@atulep atulep removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 10, 2021
@atulep atulep merged commit a03bc22 into googleapis:master Nov 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants