modified the way custom services can be imported and added a test case to verify the import functionality
This commit is contained in:
parent
78ff7f2189
commit
35c48e67a3
5 changed files with 121 additions and 20 deletions
0
daemon/tests/myservices/__init__.py
Normal file
0
daemon/tests/myservices/__init__.py
Normal file
27
daemon/tests/myservices/sample.py
Normal file
27
daemon/tests/myservices/sample.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
"""
|
||||
Sample user-defined services for testing.
|
||||
"""
|
||||
|
||||
from core.service import CoreService
|
||||
|
||||
|
||||
class MyService(CoreService):
|
||||
_name = "MyService"
|
||||
_group = "Utility"
|
||||
_depends = ()
|
||||
_dirs = ()
|
||||
_configs = ('myservice.sh',)
|
||||
_startindex = 50
|
||||
_startup = ('sh myservice.sh',)
|
||||
_shutdown = ()
|
||||
|
||||
|
||||
class MyService2(CoreService):
|
||||
_name = "MyService2"
|
||||
_group = "Utility"
|
||||
_depends = ()
|
||||
_dirs = ()
|
||||
_configs = ('myservice.sh',)
|
||||
_startindex = 50
|
||||
_startup = ('sh myservice.sh',)
|
||||
_shutdown = ()
|
Loading…
Add table
Add a link
Reference in a new issue