mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
If not script file is setted we use the default from VPCS
This commit is contained in:
1 parent
4b62d4d82c
commit
8bc26420b7
2 files changed
+22
-1
No files matched your search
@@ -155,6 +155,20 @@ def test_get_startup_script(vm):
|
||||
assert vm.startup_script == content
|
||||
|
||||
|
||||
def test_get_startup_script_using_default_script(vm):
|
||||
content = "echo GNS3 VPCS\nip 192.168.1.2\n"
|
||||
|
||||
# Reset script file location
|
||||
vm.script_file = None
|
||||
|
||||
filepath = os.path.join(vm.working_dir, 'startup.vpc')
|
||||
with open(filepath, 'w+') as f:
|
||||
assert f.write(content)
|
||||
|
||||
assert vm.startup_script == content
|
||||
assert vm.script_file == filepath
|
||||
|
||||
|
||||
def test_change_console_port(vm, port_manager):
|
||||
port1 = port_manager.get_free_console_port()
|
||||
port2 = port_manager.get_free_console_port()
|
||||
|
||||
Reference in new issue
Block a user