If not script file is setted we use the default from VPCS

This commit is contained in:
Julien Duponchelle committed 2015-01-30 14:57:25 +01:00
1 parent 4b62d4d82c
commit 8bc26420b7
2 files changed
+22 -1

No files matched your search

+14
View File
@@ -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()