Merge branch 'unstable' into api_list_images

Conflicts:
	gns3server/handlers/api/iou_handler.py
This commit is contained in:
Jeremy committed 2015-04-23 17:19:37 -06:00
commit 40ce22222e
17 files changed
+238 -35

No files matched your search

+5 -5
View File
@@ -81,11 +81,11 @@ def test_vm(project, manager):
assert vm.id == "00010203-0405-0607-0809-0a0b0c0d0e0f"
def test_vm_initial_config(project, manager):
def test_vm_initial_config_content(project, manager):
vm = IOUVM("test", "00010203-0405-0607-0808-0a0b0c0d0e0f", project, manager)
vm.initial_config = "hostname %h"
vm.initial_config_content = "hostname %h"
assert vm.name == "test"
assert vm.initial_config == "hostname test"
assert vm.initial_config_content == "hostname test"
assert vm.id == "00010203-0405-0607-0808-0a0b0c0d0e0f"
@@ -287,10 +287,10 @@ def test_update_initial_config_empty(vm):
assert f.read() == content
def test_update_initial_config_h(vm):
def test_update_initial_config_content_hostname(vm):
content = "hostname %h\n"
vm.name = "pc1"
vm.initial_config = content
vm.initial_config_content = content
with open(vm.initial_config_file) as f:
assert f.read() == "hostname pc1\n"
+2 -1
View File
@@ -32,7 +32,7 @@ def test_get_qemu_version(loop):
def test_binary_list(loop):
files_to_create = ["qemu-system-x86", "qemu-system-x42", "hello"]
files_to_create = ["qemu-system-x86", "qemu-system-x42", "qemu-kvm", "hello"]
for file_to_create in files_to_create:
path = os.path.join(os.environ["PATH"], file_to_create)
@@ -44,6 +44,7 @@ def test_binary_list(loop):
qemus = loop.run_until_complete(asyncio.async(Qemu.binary_list()))
assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x86"), "version": "2.2.0"} in qemus
assert {"path": os.path.join(os.environ["PATH"], "qemu-kvm"), "version": "2.2.0"} in qemus
assert {"path": os.path.join(os.environ["PATH"], "qemu-system-x42"), "version": "2.2.0"} in qemus
assert {"path": os.path.join(os.environ["PATH"], "hello"), "version": "2.2.0"} not in qemus