Fix : SQS Create Queue with attributes (#3345)

* Considering only new attributes while queue creation

* Linting

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
This commit is contained in:
usmangani1 2020-09-30 21:04:15 +05:30 committed by GitHub
commit 1c3ba83fc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View file

@ -545,22 +545,10 @@ class SQSBackend(BaseBackend):
queue_attributes = queue.attributes
new_queue_attributes = new_queue.attributes
static_attributes = (
"DelaySeconds",
"MaximumMessageSize",
"MessageRetentionPeriod",
"Policy",
"QueueArn",
"ReceiveMessageWaitTimeSeconds",
"RedrivePolicy",
"VisibilityTimeout",
"KmsMasterKeyId",
"KmsDataKeyReusePeriodSeconds",
"FifoQueue",
"ContentBasedDeduplication",
)
for key in static_attributes:
# only the attributes which are being sent for the queue
# creation have to be compared if the queue is existing.
for key in kwargs:
if queue_attributes.get(key) != new_queue_attributes.get(key):
raise QueueAlreadyExists("The specified queue already exists.")
else: