def test_delete():
    request = Request('Delete', 'bla', 's')
    provider = ResourceProvider()
    request['ResourceType'] == provider.custom_cfn_resource_name
    provider.set_request(request, {})
    provider.execute()
    assert provider.status == 'SUCCESS'
    assert provider.reason.startswith('delete not implemented')
def test_delete():
    request = Request('Delete', 'bla', 's')
    provider = ResourceProvider()
    request['ResourceType'] == provider.custom_cfn_resource_name
    provider.set_request(request, {})
    provider.execute()
    assert provider.status == 'SUCCESS'
    assert provider.reason.startswith('delete not implemented')
def test_invalid_type_delete():
    request = Request('Delete', 'bla', 's')
    request['ResourceType'] = 'Custom::Secret'
    provider = ResourceProvider()
    provider.set_request(request, {})
    provider.execute()
    assert provider.status == 'SUCCESS'
    assert provider.reason == 'ResourceType Custom::Secret not supported by provider Custom::Resource'
def test_invalid_type_delete():
    request = Request('Delete', 'bla', 's')
    request['ResourceType'] = 'Custom::Secret'
    provider = ResourceProvider()
    provider.set_request(request, {})
    provider.execute()
    assert provider.status == 'SUCCESS'
    assert provider.reason == 'ResourceType Custom::Secret not supported by provider Custom::Resource'
def test_delete():
    request = Request("Delete", "bla", str(uuid4()))
    provider = ResourceProvider()
    request["ResourceType"] == provider.custom_cfn_resource_name
    provider.set_request(request, {})
    provider.execute()
    assert provider.status == "SUCCESS"
    assert provider.reason.startswith("delete not implemented")
def test_update():
    request = Request("Update", "bla", str(uuid4()))
    provider = ResourceProvider()
    request["ResourceType"] == provider.custom_cfn_resource_name
    provider.set_request(request, {})
    provider.execute()
    assert provider.physical_resource_id
    assert provider.status == "FAILED"
    assert provider.reason.startswith("update not implemented")
def test_invalid_type_delete():
    request = Request("Delete", "bla", str(uuid4()))
    request["ResourceType"] = "Custom::Secret"
    provider = ResourceProvider()
    provider.set_request(request, {})
    provider.execute()
    assert provider.status == "SUCCESS"
    assert (
        provider.reason ==
        "ResourceType Custom::Secret not supported by provider Custom::Resource"
    )
def test_invalid_type_create():
    request = Request("Create", "bla", str(uuid4()))
    request["ResourceType"] = "Custom::Secret"
    provider = ResourceProvider()
    provider.set_request(request, {})
    provider.execute()
    assert provider.physical_resource_id
    assert provider.status == "FAILED"
    assert (
        provider.reason ==
        "ResourceType Custom::Secret not supported by provider Custom::Resource"
    )