mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-20 13:15:14 +02:00
Method for start / stop capture on a link
Ref https://github.com/GNS3/gns3-gui/issues/1117
This commit is contained in:
9 files changed
+230
-18
No files matched your search
@@ -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"
|
||||
Reference in new issue
Block a user