Allow "True" in SQS Queue boolean attributes (#4830)
This commit is contained in:
parent
87dfa2e922
commit
c25aae0d9a
@ -327,7 +327,7 @@ class Queue(CloudFormationModel):
|
||||
if key in integer_fields:
|
||||
value = int(value)
|
||||
if key in bool_fields:
|
||||
value = value == "true"
|
||||
value = str(value).lower() == "true"
|
||||
|
||||
if key in ["Policy", "RedrivePolicy"] and value is not None:
|
||||
continue
|
||||
|
@ -264,7 +264,7 @@ dummy_redrive_template = {
|
||||
},
|
||||
"DeadLetterQueue": {
|
||||
"Type": "AWS::SQS::Queue",
|
||||
"Properties": {"FifoQueue": True},
|
||||
"Properties": {"QueueName": "deadletterqueue.fifo", "FifoQueue": True},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -95,12 +95,12 @@ def test_create_queue_with_different_attributes_fail():
|
||||
raise RuntimeError("Should of raised QueueAlreadyExists Exception")
|
||||
|
||||
q_name2 = str(uuid4())[0:6]
|
||||
response = sqs.create_queue(QueueName=q_name2, Attributes={"FifoQueue": "True"})
|
||||
response = sqs.create_queue(QueueName=q_name2, Attributes={"FifoQueue": "tru"})
|
||||
|
||||
attributes = {"VisibilityTimeout": "60"}
|
||||
sqs.set_queue_attributes(QueueUrl=response.get("QueueUrl"), Attributes=attributes)
|
||||
|
||||
new_response = sqs.create_queue(QueueName=q_name2, Attributes={"FifoQueue": "True"})
|
||||
new_response = sqs.create_queue(QueueName=q_name2, Attributes={"FifoQueue": "tru"})
|
||||
new_response["QueueUrl"].should.equal(response.get("QueueUrl"))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user