Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos.toolbox
Commits
84a8dbe5
Commit
84a8dbe5
authored
Feb 15, 2018
by
Tristan Cavelier
Committed by
Alain Takoudjou
Feb 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check_apachedex_result: improve output message
test_check_apachedex_result: fix float threshold
parent
a70c5fd2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
slapos/promise/check_apachedex_result/__init__.py
slapos/promise/check_apachedex_result/__init__.py
+1
-1
slapos/test/promise/test_check_apachedex_result.py
slapos/test/promise/test_check_apachedex_result.py
+2
-2
No files found.
slapos/promise/check_apachedex_result/__init__.py
View file @
84a8dbe5
...
@@ -38,7 +38,7 @@ def checkApachedexResult(apachedex_path, apachedex_report_status_file, desired_t
...
@@ -38,7 +38,7 @@ def checkApachedexResult(apachedex_path, apachedex_report_status_file, desired_t
if
apx_result
>
desired_threshold
:
if
apx_result
>
desired_threshold
:
return
0
,
"Thanks for keeping it all clean, result is %s"
%
apx_result
return
0
,
"Thanks for keeping it all clean, result is %s"
%
apx_result
else
:
else
:
return
1
,
"Threshold is lower than expected: Expected was %
f
and current result is %s"
%
(
desired_threshold
,
apx_result
)
return
1
,
"Threshold is lower than expected: Expected was %
s
and current result is %s"
%
(
desired_threshold
,
apx_result
)
message
=
"No result found in the apdex file or the file is corrupted"
message
=
"No result found in the apdex file or the file is corrupted"
break
break
...
...
slapos/test/promise/test_check_apachedex_result.py
View file @
84a8dbe5
...
@@ -82,8 +82,8 @@ class TestCheckApacheDigestResult(unittest.TestCase):
...
@@ -82,8 +82,8 @@ class TestCheckApacheDigestResult(unittest.TestCase):
self
.
_create_file
(
self
.
today
,
True
)
self
.
_create_file
(
self
.
today
,
True
)
def
test_threshold_is_lower
(
self
):
def
test_threshold_is_lower
(
self
):
status
,
message
=
checkApachedexResult
(
self
.
base_dir
,
self
.
status_file
,
90
)
status
,
message
=
checkApachedexResult
(
self
.
base_dir
,
self
.
status_file
,
threshold
)
self
.
assertEquals
(
"Threshold is lower than expected: Expected was 90 and current result is 80"
,
message
)
self
.
assertEquals
(
"Threshold is lower than expected: Expected was 90
.0
and current result is 80"
,
message
)
self
.
assertEquals
(
1
,
status
)
self
.
assertEquals
(
1
,
status
)
def
test_no_today_file_but_yesterday_file
(
self
):
def
test_no_today_file_but_yesterday_file
(
self
):
...
...
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