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 system test for 'Sink.create' using a Pubsub topic. #1656

Closed
wants to merge 19 commits into from
Closed

Add system test for 'Sink.create' using a Pubsub topic. #1656

wants to merge 19 commits into from

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Mar 24, 2016

Currently broken because 'Topic.set_iam_policy' returns 503s. See: #1654.

@tseaver tseaver added testing do not merge Indicates a pull request not ready for merge, due to either quality or timing. api: logging Issues related to the Cloud Logging API. labels Mar 24, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 24, 2016
@tseaver tseaver changed the title Add system test for sink creation w/ pubsub topic. Add system test for 'Sink.create' using a Pubsub topic. Mar 24, 2016
try:
doomed.delete()
except NotFound as error:
print('Unable to delete resource: %s' % error)

This comment was marked as spam.

This comment was marked as spam.

Convert names from the XML API to the equivalent JSON names.

Fixes #1659.
@tseaver
Copy link
Contributor Author

tseaver commented Mar 28, 2016

Rebased after merging #1658 to the logging-api branch.

tseaver and others added 14 commits March 28, 2016 13:52
…n_spellings

Allow predefined ACL names from either XML or JSON APIs.
fix failing tests

remove typing from expected value

remove schema marker from dns#quotas return value

update test specs for dns.Client#quotas

remove schema marker from dns#quotas return value

update test specs for dns.Client#quotas

remove schema marker from dns#quotas return value

fix failing tests for dns#quotas return value

conditional skipping of the `kind` key
Improve correspondence w/ role names used by pubsub.

Addresses:
#1654 (comment)
#1654 (comment).
Address three separate cases:

- Query finishes within timeout, with all rows present.

- Query finishes within timeout, but result set is too large for
  initial response.

- Query times out.

Closes #1551.
Expand/clarify synchronous query usage docs.
Add system tests for topic/subscription IAM policy get/set methods.
Cache job constructed for a synchronous query.
@tseaver
Copy link
Contributor Author

tseaver commented Mar 30, 2016

@dhermes 1248b66 backs out the workaround for #1657. PTAL

@tseaver tseaver assigned tseaver and dhermes and unassigned tseaver Mar 30, 2016
@@ -51,6 +52,7 @@ def setUp(self):
self.to_delete = []

def tearDown(self):
from gcloud.exceptions import NotFound

This comment was marked as spam.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Mar 30, 2016
@dhermes
Copy link
Contributor

dhermes commented Mar 30, 2016

Bad rebase?

@dhermes
Copy link
Contributor

dhermes commented Mar 30, 2016

Continuing our discussion. Yeah it is too clever but a few more lines will get you where you need without having a hardcoded URL in two different places.

url = pubsub_client.connection.api_base_url + topic.path
if url.startswith('https://'):
    url = url[8:]

@tseaver
Copy link
Contributor Author

tseaver commented Mar 30, 2016

Yup, I hadn't pushed the underlying logging-api merge yet (needed to make topic.setIamPolcy not raise).

@dhermes
Copy link
Contributor

dhermes commented Mar 30, 2016

Ping me when this PR looks how you expected it to?

@tseaver
Copy link
Contributor Author

tseaver commented Mar 30, 2016

Using pubsub_client.connection.api_base_url to compute the prefix of the destination string is wrong: the prefix as defined in the projects.sink.create API just happens to match. I've updated to use topic.full_name to compute the suffix, however.

@tseaver
Copy link
Contributor Author

tseaver commented Mar 30, 2016

Sigh. I'll open a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. cla: no This human has *not* signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants