Method for start / stop capture on a link

Ref https://github.com/GNS3/gns3-gui/issues/1117
This commit is contained in:
Julien Duponchelle committed 2016-04-21 12:14:09 +02:00
1 parent 78a9785819
commit 04a1b2df3b
9 files changed
+230 -18

No files matched your search

+10
View File
@@ -57,6 +57,7 @@ def test_json(async_run, project, compute):
async_run(link.addVM(vm2, 1, 3))
assert link.__json__() == {
"link_id": link.id,
"data_link_type": "DLT_EN10MB",
"vms": [
{
"vm_id": vm1.id,
@@ -70,3 +71,12 @@ def test_json(async_run, project, compute):
}
]
}
def test_capture_filename(project, compute, async_run):
vm1 = VM(project, compute, name="Hello@")
vm2 = VM(project, compute, name="w0.rld")
link = Link(project)
async_run(link.addVM(vm1, 0, 4))
async_run(link.addVM(vm2, 1, 3))
assert link.capture_file_name() == "Hello_0-4_to_w0rld_1-3.pcap"