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

Fixing broken logging system test. #3325

Merged
merged 1 commit into from
Apr 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion logging/tests/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ def test_create_sink_storage_bucket(self):
self.assertTrue(sink.exists())

def test_create_sink_pubsub_topic(self):
from google.cloud.iam import OWNER_ROLE
from google.cloud.pubsub import client as pubsub_client

SINK_NAME = 'test-create-sink-topic%s' % (_RESOURCE_ID,)
TOPIC_NAME = 'logging-test-sink%s' % (_RESOURCE_ID,)

Expand All @@ -400,7 +402,9 @@ def test_create_sink_pubsub_topic(self):
topic.create()
self.to_delete.append(topic)
policy = topic.get_iam_policy()
policy.owners.add(policy.group('cloud-logs@google.com'))
new_owners = set([policy.group('cloud-logs@google.com')])
new_owners.update(policy.owners)
policy[OWNER_ROLE] = new_owners
topic.set_iam_policy(policy)

TOPIC_URI = 'pubsub.googleapis.com/%s' % (topic.full_name,)
Expand Down