add subscription role arn attribute (#5303)
This commit is contained in:
parent
ab045f5beb
commit
98501ae676
@ -727,6 +727,7 @@ class SNSBackend(BaseBackend):
|
|||||||
"DeliveryPolicy",
|
"DeliveryPolicy",
|
||||||
"FilterPolicy",
|
"FilterPolicy",
|
||||||
"RedrivePolicy",
|
"RedrivePolicy",
|
||||||
|
"SubscriptionRoleArn",
|
||||||
]:
|
]:
|
||||||
raise SNSInvalidParameter("AttributeName")
|
raise SNSInvalidParameter("AttributeName")
|
||||||
|
|
||||||
|
@ -258,6 +258,8 @@ def test_creating_subscription_with_attributes():
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
subscription_role_arn = "arn:aws:iam:000000000:role/test-role"
|
||||||
|
|
||||||
conn.subscribe(
|
conn.subscribe(
|
||||||
TopicArn=topic_arn,
|
TopicArn=topic_arn,
|
||||||
Protocol="http",
|
Protocol="http",
|
||||||
@ -266,6 +268,7 @@ def test_creating_subscription_with_attributes():
|
|||||||
"RawMessageDelivery": "true",
|
"RawMessageDelivery": "true",
|
||||||
"DeliveryPolicy": delivery_policy,
|
"DeliveryPolicy": delivery_policy,
|
||||||
"FilterPolicy": filter_policy,
|
"FilterPolicy": filter_policy,
|
||||||
|
"SubscriptionRoleArn": subscription_role_arn,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -284,6 +287,7 @@ def test_creating_subscription_with_attributes():
|
|||||||
attrs["Attributes"]["RawMessageDelivery"].should.equal("true")
|
attrs["Attributes"]["RawMessageDelivery"].should.equal("true")
|
||||||
attrs["Attributes"]["DeliveryPolicy"].should.equal(delivery_policy)
|
attrs["Attributes"]["DeliveryPolicy"].should.equal(delivery_policy)
|
||||||
attrs["Attributes"]["FilterPolicy"].should.equal(filter_policy)
|
attrs["Attributes"]["FilterPolicy"].should.equal(filter_policy)
|
||||||
|
attrs["Attributes"]["SubscriptionRoleArn"].should.equal(subscription_role_arn)
|
||||||
|
|
||||||
# Now unsubscribe the subscription
|
# Now unsubscribe the subscription
|
||||||
conn.unsubscribe(SubscriptionArn=subscription["SubscriptionArn"])
|
conn.unsubscribe(SubscriptionArn=subscription["SubscriptionArn"])
|
||||||
|
Loading…
Reference in New Issue
Block a user