mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-01 04:38:12 +00:00
parent
7aedfc92fa
commit
f4f9e6eba6
@ -95,7 +95,11 @@ class DockerVM(BaseVM):
|
||||
|
||||
@start_command.setter
|
||||
def start_command(self, command):
|
||||
self._start_command = command
|
||||
command = command.strip()
|
||||
if len(command) == 0:
|
||||
self._start_command = None
|
||||
else:
|
||||
self._start_command = command
|
||||
|
||||
@property
|
||||
def environment(self):
|
||||
|
@ -60,6 +60,15 @@ def test_json(vm, project):
|
||||
}
|
||||
|
||||
|
||||
def test_start_command(vm):
|
||||
|
||||
vm.start_command = "hello"
|
||||
assert vm.start_command == "hello"
|
||||
vm.start_command = " "
|
||||
assert vm.start_command is None
|
||||
|
||||
|
||||
|
||||
def test_create(loop, project, manager):
|
||||
|
||||
response = {
|
||||
|
Loading…
Reference in New Issue
Block a user