Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
Mynij
slapos-mynij-dev
Commits
e381c05b
Commit
e381c05b
authored
Mar 13, 2019
by
Łukasz Nowak
Committed by
Łukasz Nowak
Apr 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend/test: Allow extended msg in assertTestData
parent
1e7ef8e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+6
-2
No files found.
software/caddy-frontend/test/test.py
View file @
e381c05b
...
...
@@ -273,7 +273,7 @@ class TestDataMixin(object):
'%(group)s:%(name)s %(statename)s'
%
q
for
q
in
self
.
getSupervisorRPCServer
().
supervisor
.
getAllProcessInfo
()]))
def
assertTestData
(
self
,
runtime_data
,
hash_value
=
None
):
def
assertTestData
(
self
,
runtime_data
,
hash_value
=
None
,
msg
=
None
):
filename
=
'%s-%s.txt'
%
(
self
.
id
(),
'CADDY'
)
test_data_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
'test_data'
,
filename
)
...
...
@@ -288,10 +288,13 @@ class TestDataMixin(object):
maxDiff
=
self
.
maxDiff
self
.
maxDiff
=
None
longMessage
=
self
.
longMessage
self
.
longMessage
=
True
try
:
self
.
assertMultiLineEqual
(
test_data
,
runtime_data
runtime_data
,
msg
=
msg
)
except
AssertionError
:
if
os
.
environ
.
get
(
'SAVE_TEST_DATA'
,
'0'
)
==
'1'
:
...
...
@@ -299,6 +302,7 @@ class TestDataMixin(object):
raise
finally
:
self
.
maxDiff
=
maxDiff
self
.
longMessage
=
longMessage
def
_test_file_list
(
self
,
slave_dir
,
IGNORE_PATH_LIST
):
runtime_data
=
[]
...
...
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