Add events target integration for sqs fifo queue (#3830)
* Add events target integration for sqs fifo queue * Rename test file
This commit is contained in:
parent
b01c58785b
commit
e90858b2e8
3 changed files with 149 additions and 4 deletions
|
|
@ -401,6 +401,35 @@ def test_put_targets_error_unknown_rule():
|
|||
)
|
||||
|
||||
|
||||
@mock_events
|
||||
def test_put_targets_error_missing_parameter_sqs_fifo():
|
||||
# given
|
||||
client = boto3.client("events", "eu-central-1")
|
||||
|
||||
# when
|
||||
with pytest.raises(ClientError) as e:
|
||||
client.put_targets(
|
||||
Rule="unknown",
|
||||
Targets=[
|
||||
{
|
||||
"Id": "sqs-fifo",
|
||||
"Arn": "arn:aws:sqs:eu-central-1:{}:test-queue.fifo".format(
|
||||
ACCOUNT_ID
|
||||
),
|
||||
}
|
||||
],
|
||||
)
|
||||
|
||||
# then
|
||||
ex = e.value
|
||||
ex.operation_name.should.equal("PutTargets")
|
||||
ex.response["ResponseMetadata"]["HTTPStatusCode"].should.equal(400)
|
||||
ex.response["Error"]["Code"].should.contain("ValidationException")
|
||||
ex.response["Error"]["Message"].should.equal(
|
||||
"Parameter(s) SqsParameters must be specified for target: sqs-fifo."
|
||||
)
|
||||
|
||||
|
||||
@mock_events
|
||||
def test_permissions():
|
||||
client = boto3.client("events", "eu-central-1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue