iot:DeleteThingGroup should return success even for non-existent groups (#3367)

Closes #3026
This commit is contained in:
Brian Pandola 2020-10-09 07:57:00 -07:00 committed by GitHub
commit db7842653f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -1038,11 +1038,15 @@ def test_delete_thing_group():
res.should.have.key("thingGroups").which.should.have.length_of(1)
res["thingGroups"].should_not.have.key(group_name_2a)
# now that there is no child group, we can delete the previus group safely
# now that there is no child group, we can delete the previous group safely
client.delete_thing_group(thingGroupName=group_name_1a)
res = client.list_thing_groups()
res.should.have.key("thingGroups").which.should.have.length_of(0)
# Deleting an invalid thing group does not raise an error.
res = client.delete_thing_group(thingGroupName="non-existent-group-name")
res["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
@mock_iot
def test_describe_thing_group_metadata_hierarchy():