2 Test N2VC's ssh key generation
13 async def test_model_create():
14 """Test the creation of a new model."""
15 client
= base
.get_n2vc()
17 model_name
= "test-{}".format(
18 uuid
.uuid4().hex[-4:],
21 pytest
.assume(await client
.CreateNetworkService(model_name
))
22 pytest
.assume(await client
.DestroyNetworkService(model_name
))
23 pytest
.assume(await client
.logout())
27 async def test_destroy_non_existing_network_service():
28 """Destroy a model that doesn't exist."""
30 client
= base
.get_n2vc()
32 model_name
= "test-{}".format(
33 uuid
.uuid4().hex[-4:],
36 with pytest
.raises(n2vc
.vnf
.NetworkServiceDoesNotExist
):
37 pytest
.assume(await client
.DestroyNetworkService(model_name
))
39 pytest
.assume(await client
.logout())
43 async def test_model_create_duplicate():
44 """Create a new model, and try to create the same model."""
45 client
= base
.get_n2vc()
47 model_name
= "test-{}".format(
48 uuid
.uuid4().hex[-4:],
51 # Try to recreate bug 628
52 for x
in range(0, 1000):
53 model
= await client
.get_model(model_name
)
56 pytest
.assume(await client
.DestroyNetworkService(model_name
))
57 pytest
.assume(await client
.logout())