mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Merge branch 'master' into unstable
This commit is contained in:
commit
7967a922bc
1
.coverage.atlantis.6236.785802
Normal file
1
.coverage.atlantis.6236.785802
Normal file
@ -0,0 +1 @@
|
||||
!coverage.py: This is a private format, don't read it directly!{"lines": {"/Users/noplay/code/gns3/gns3-server/gns3server/modules/docker/docker_vm.py": [20, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 34, 35, 38, 46, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 77, 82, 89, 91, 92, 93, 94, 95, 97, 101, 102, 103, 104, 105, 106, 109, 112, 113, 114, 115, 116, 118, 122, 123, 124, 126, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 142, 143, 144, 145, 146, 147, 148, 149, 155, 156, 157, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 197, 198, 199, 215, 216, 217, 273, 274, 275, 285, 286, 287, 291, 292, 298, 299, 300, 301, 302, 303, 304, 306, 307, 308, 332, 333, 334, 339, 340, 341, 342, 343, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360], "/Users/noplay/code/gns3/gns3-server/gns3server/modules/docker/__init__.py": [20, 22, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 37, 39, 41, 42, 44, 45, 47, 48, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 72, 79, 80, 81, 82, 83], "/Users/noplay/code/gns3/gns3-server/gns3server/modules/docker/docker_error.py": [20, 22, 25, 26]}}
|
16
README.rst
16
README.rst
@ -163,7 +163,6 @@ and homebrew: http://brew.sh/.
|
||||
python3 setup.py install
|
||||
gns3server
|
||||
|
||||
|
||||
SSL
|
||||
---
|
||||
|
||||
@ -190,3 +189,18 @@ Or in your gns3_server.conf by adding in the Server section:
|
||||
certfile=/Users/noplay/.config/GNS3/ssl/server.cert
|
||||
certkey=/Users/noplay/.config/GNS3/ssl/server.key
|
||||
ssl=True
|
||||
|
||||
Running tests
|
||||
*************
|
||||
|
||||
Just run:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
py.test -vv
|
||||
|
||||
If you want test coverage:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
py.test --cov=gns3server
|
||||
|
@ -90,7 +90,7 @@ class PortManager:
|
||||
|
||||
return self._console_port_range
|
||||
|
||||
@console_host.setter
|
||||
@console_port_range.setter
|
||||
def console_port_range(self, new_range):
|
||||
|
||||
assert isinstance(new_range, tuple)
|
||||
@ -111,7 +111,7 @@ class PortManager:
|
||||
|
||||
return self._udp_port_range
|
||||
|
||||
@udp_host.setter
|
||||
@udp_port_range.setter
|
||||
def udp_port_range(self, new_range):
|
||||
|
||||
assert isinstance(new_range, tuple)
|
||||
|
@ -94,7 +94,6 @@ class WinStreamHandler(logging.StreamHandler):
|
||||
stream.write(msg.encode(stream.encoding, errors="replace").decode(stream.encoding))
|
||||
stream.write(self.terminator)
|
||||
self.flush()
|
||||
pass
|
||||
except Exception:
|
||||
self.handleError(record)
|
||||
|
||||
|
@ -197,10 +197,10 @@ def test_backup_images(server, tmpdir, loop):
|
||||
tar.close()
|
||||
|
||||
assert os.path.exists(os.path.join('QEMU', 'a.img'))
|
||||
open(os.path.join('QEMU', 'a.img')).read() == 'hello'
|
||||
assert open(os.path.join('QEMU', 'a.img')).read() == 'hello'
|
||||
|
||||
assert os.path.exists(os.path.join('QEMU', 'b.img'))
|
||||
open(os.path.join('QEMU', 'b.img')).read() == 'world'
|
||||
assert open(os.path.join('QEMU', 'b.img')).read() == 'world'
|
||||
|
||||
|
||||
def test_backup_projects(server, tmpdir, loop):
|
||||
@ -229,7 +229,7 @@ def test_backup_projects(server, tmpdir, loop):
|
||||
tar.close()
|
||||
|
||||
assert os.path.exists(os.path.join('a', 'a.gns3'))
|
||||
open(os.path.join('a', 'a.gns3')).read() == 'hello'
|
||||
assert open(os.path.join('a', 'a.gns3')).read() == 'hello'
|
||||
|
||||
assert os.path.exists(os.path.join('b', 'b.gns3'))
|
||||
open(os.path.join('b', 'b.gns3')).read() == 'world'
|
||||
assert open(os.path.join('b', 'b.gns3')).read() == 'world'
|
||||
|
@ -181,15 +181,6 @@ def test_update_startup_script(vm):
|
||||
assert f.read() == content
|
||||
|
||||
|
||||
def test_update_startup_script(vm):
|
||||
content = "echo GNS3 VPCS\nip 192.168.1.2\n"
|
||||
vm.startup_script = content
|
||||
filepath = os.path.join(vm.working_dir, 'startup.vpc')
|
||||
assert os.path.exists(filepath)
|
||||
with open(filepath) as f:
|
||||
assert f.read() == content
|
||||
|
||||
|
||||
def test_update_startup_script_h(vm):
|
||||
content = "setname %h\n"
|
||||
vm.name = "pc1"
|
||||
|
Loading…
Reference in New Issue
Block a user