Skip to content

Commit

Permalink
Using client's credentials in error reporting (instead of connection).
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Feb 23, 2017
1 parent a151715 commit 7e29a3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion error_reporting/google/cloud/error_reporting/_gax.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def make_report_error_api(client):
:returns: An Error Reporting API instance.
"""
channel = make_secure_channel(
client._connection.credentials,
client._credentials,
DEFAULT_USER_AGENT,
report_errors_service_client.ReportErrorsServiceClient.SERVICE_ADDRESS)
gax_client = report_errors_service_client.ReportErrorsServiceClient(
Expand Down
6 changes: 5 additions & 1 deletion error_reporting/unit_tests/test__gax.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ def test_make_report_error_api(self):
from google.cloud.error_reporting import __version__
from google.cloud.error_reporting._gax import make_report_error_api

client = mock.Mock()
client = mock.Mock(
_credentials=mock.sentinel.credentials,
project='prahj-ekt',
spec=['project', '_credentials'],
)

# Mock out the constructor for the GAPIC client.
ServiceClient = report_errors_service_client.ReportErrorsServiceClient
Expand Down

0 comments on commit 7e29a3d

Please sign in to comment.