Skip to content

Commit

Permalink
Fixing broken logging system test. (#3325)
Browse files Browse the repository at this point in the history
Tries to update a frozenset().
  • Loading branch information
dhermes authored Apr 27, 2017
1 parent b657337 commit c9f29c9
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit c9f29c9

Please sign in to comment.