Merge pull request #2770 from oanise93/fix_ssm_delete_parameter

Changes behavior of delete_parameter when parameter doesn't exist
This commit is contained in:
Bert Blommers 2020-03-06 08:39:49 +00:00 committed by GitHub
commit a86f459ac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 5 deletions

View file

@ -30,6 +30,18 @@ def test_delete_parameter():
len(response["Parameters"]).should.equal(0)
@mock_ssm
def test_delete_nonexistent_parameter():
client = boto3.client("ssm", region_name="us-east-1")
with assert_raises(ClientError) as ex:
client.delete_parameter(Name="test_noexist")
ex.exception.response["Error"]["Code"].should.equal("ParameterNotFound")
ex.exception.response["Error"]["Message"].should.equal(
"Parameter test_noexist not found."
)
@mock_ssm
def test_delete_parameters():
client = boto3.client("ssm", region_name="us-east-1")