File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,12 @@ def _by_timestamp(message):
169169 self .assertEqual (message2 .data , MESSAGE_2 )
170170 self .assertEqual (message2 .attributes ['extra' ], EXTRA_2 )
171171
172+ def _maybe_emulator_skip (self ):
173+ if os .getenv (PUBSUB_EMULATOR ) is not None :
174+ self .skipTest ('IAM not supported by Pub/Sub emulator' )
175+
172176 def test_topic_iam_policy (self ):
177+ self ._maybe_emulator_skip ()
173178 topic_name = 'test-topic-iam-policy-topic-%d' % (1000 * time .time (),)
174179 topic = Config .CLIENT .topic (topic_name )
175180 topic .create ()
@@ -185,6 +190,7 @@ def test_topic_iam_policy(self):
185190 self .assertEqual (new_policy .viewers , policy .viewers )
186191
187192 def test_subscription_iam_policy (self ):
193+ self ._maybe_emulator_skip ()
188194 topic_name = 'test-sub-iam-policy-topic-%d' % (1000 * time .time (),)
189195 topic = Config .CLIENT .topic (topic_name )
190196 topic .create ()
You can’t perform that action at this time.
0 commit comments