Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
e2f89202
Commit
e2f89202
authored
Apr 13, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: make the number of days to keep log configurable
parent
e6034f39
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
erp5/util/testnode/__init__.py
erp5/util/testnode/__init__.py
+1
-1
erp5/util/testnode/testnode.py
erp5/util/testnode/testnode.py
+2
-5
No files found.
erp5/util/testnode/__init__.py
View file @
e2f89202
...
@@ -74,7 +74,7 @@ def main(*args):
...
@@ -74,7 +74,7 @@ def main(*args):
'proxy_port'
,
'git_binary'
,
'zip_binary'
,
'node_quantity'
,
'proxy_port'
,
'git_binary'
,
'zip_binary'
,
'node_quantity'
,
'test_node_title'
,
'ipv4_address'
,
'ipv6_address'
,
'test_suite_master_url'
,
'test_node_title'
,
'ipv4_address'
,
'ipv6_address'
,
'test_suite_master_url'
,
'slapos_binary'
,
'httpd_ip'
,
'httpd_port'
,
'httpd_software_access_port'
,
'slapos_binary'
,
'httpd_ip'
,
'httpd_port'
,
'httpd_software_access_port'
,
'computer_id'
,
'server_url'
,
'shared_part_list'
):
'computer_id'
,
'server_url'
,
'shared_part_list'
,
'keep_log_days'
):
CONFIG
[
key
]
=
config
.
get
(
'testnode'
,
key
)
CONFIG
[
key
]
=
config
.
get
(
'testnode'
,
key
)
for
key
in
(
'slapos_directory'
,
'working_directory'
,
'test_suite_directory'
,
for
key
in
(
'slapos_directory'
,
'working_directory'
,
'test_suite_directory'
,
...
...
erp5/util/testnode/testnode.py
View file @
e2f89202
...
@@ -41,8 +41,6 @@ from .Utils import deunicodeData
...
@@ -41,8 +41,6 @@ from .Utils import deunicodeData
from
.Utils
import
rmtree
from
.Utils
import
rmtree
from
..
import
taskdistribution
from
..
import
taskdistribution
MAX_LOG_TIME
=
15
# time in days we should keep logs that we can see through
# httd
MAX_TEMP_TIME
=
0.01
# time in days we should keep temp files
MAX_TEMP_TIME
=
0.01
# time in days we should keep temp files
PROFILE_PATH_KEY
=
'profile_path'
PROFILE_PATH_KEY
=
'profile_path'
...
@@ -54,14 +52,13 @@ test_type_registry = {
...
@@ -54,14 +52,13 @@ test_type_registry = {
class
TestNode
(
object
):
class
TestNode
(
object
):
def
__init__
(
self
,
config
,
max_log_time
=
MAX_LOG_TIME
,
def
__init__
(
self
,
config
,
max_temp_time
=
MAX_TEMP_TIME
):
max_temp_time
=
MAX_TEMP_TIME
):
self
.
config
=
config
or
{}
self
.
config
=
config
or
{}
self
.
process_manager
=
ProcessManager
()
self
.
process_manager
=
ProcessManager
()
self
.
working_directory
=
config
[
'working_directory'
]
self
.
working_directory
=
config
[
'working_directory'
]
self
.
node_test_suite_dict
=
{}
self
.
node_test_suite_dict
=
{}
self
.
file_handler
=
None
self
.
file_handler
=
None
self
.
max_log_time
=
max_log_time
self
.
max_log_time
=
float
(
config
.
get
(
'keep_log_days'
,
15
))
self
.
max_temp_time
=
max_temp_time
self
.
max_temp_time
=
max_temp_time
self
.
url_access
=
"https://[0::0]:0123"
# Ipv6 + port of the node
self
.
url_access
=
"https://[0::0]:0123"
# Ipv6 + port of the node
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment