示例#1
0
def test_create_volume():
    vols = client.volumes.list()
    nvols = len(vols)
    
    plugin.create_volume(v0)
    vols = client.volumes.list()
    assert len(vols) == nvols + 1

    plugin.delete_volume(v0)
示例#2
0
def test_create_volume2():
    vols = client.volumes.list()
    nvols = len(vols)
    
    plugin.create_volume(v0)
    vols = client.volumes.list()
    assert len(vols) == nvols + 1

    with pytest.raises(Exception):
        plugin.create_volume(v0)

    plugin.delete_volume(v0)
示例#3
0
def test_delete_volume2():
    with pytest.raises(Exception):
        plugin.delete_volume(v0)