mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 07:11:13 +02:00
Patch hostname in configuration file even if name is unsync
Ref https://github.com/GNS3/gns3-gui/issues/1889
This commit is contained in:
5 files changed
+23
-6
No files matched your search
@@ -298,6 +298,14 @@ def test_change_name(vm, tmpdir):
|
||||
assert vm.name == "hello"
|
||||
with open(path) as f:
|
||||
assert f.read() == "hostname hello"
|
||||
# support hostname not sync
|
||||
vm.name = "alpha"
|
||||
with open(path, 'w+') as f:
|
||||
f.write("no service password-encryption\nhostname beta\nno ip icmp rate-limit unreachable")
|
||||
vm.name = "charlie"
|
||||
assert vm.name == "charlie"
|
||||
with open(path) as f:
|
||||
assert f.read() == "no service password-encryption\nhostname charlie\nno ip icmp rate-limit unreachable"
|
||||
|
||||
|
||||
def test_library_check(loop, vm):
|
||||
|
||||
Reference in new issue
Block a user