コード例 #1
0
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')
コード例 #2
0
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')
コード例 #3
0
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'
コード例 #4
0
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'
コード例 #5
0
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")
コード例 #6
0
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")
コード例 #7
0
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"
    )
コード例 #8
0
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"
    )