diff --git a/tests/compute/dynamips/test_dynamips_router.py b/tests/compute/dynamips/test_dynamips_router.py index 7dde8b51..e3cf7fed 100644 --- a/tests/compute/dynamips/test_dynamips_router.py +++ b/tests/compute/dynamips/test_dynamips_router.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import os +import uuid import pytest import asyncio import configparser @@ -46,18 +47,19 @@ def test_router(project, manager): def test_convert_project_before_2_0_0_b3(project, manager): + node_id = str(uuid.uuid4()) wdir = project.module_working_directory(manager.module_name.lower()) - os.makedirs(os.path.join(wdir, "00010203-0405-0607-0809-0a0b0c0d0e0f")) + os.makedirs(os.path.join(wdir, node_id)) os.makedirs(os.path.join(wdir, "configs")) open(os.path.join(wdir, "configs", "i1_startup-config.cfg"), "w+").close() open(os.path.join(wdir, "configs", "i2_startup-config.cfg"), "w+").close() open(os.path.join(wdir, "c7200_i1_nvram"), "w+").close() open(os.path.join(wdir, "c7200_i2_nvram"), "w+").close() - router = Router("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", project, manager, dynamips_id=1) - assert os.path.exists(os.path.join(wdir, "00010203-0405-0607-0809-0a0b0c0d0e0f", "configs", "i1_startup-config.cfg")) - assert not os.path.exists(os.path.join(wdir, "00010203-0405-0607-0809-0a0b0c0d0e0f", "configs", "i2_startup-config.cfg")) - assert os.path.exists(os.path.join(wdir, "00010203-0405-0607-0809-0a0b0c0d0e0f", "c7200_i1_nvram")) - assert not os.path.exists(os.path.join(wdir, "00010203-0405-0607-0809-0a0b0c0d0e0f", "c7200_i2_nvram")) + router = Router("test", node_id, project, manager, dynamips_id=1) + assert os.path.exists(os.path.join(wdir, node_id, "configs", "i1_startup-config.cfg")) + assert not os.path.exists(os.path.join(wdir, node_id, "configs", "i2_startup-config.cfg")) + assert os.path.exists(os.path.join(wdir, node_id, "c7200_i1_nvram")) + assert not os.path.exists(os.path.join(wdir, node_id, "c7200_i2_nvram")) def test_router_invalid_dynamips_path(project, manager, loop):