Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.cmmi
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
Xavier Thompson
slapos.recipe.cmmi
Commits
3de46334
Commit
3de46334
authored
Apr 26, 2020
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
a76ec7be
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
98 deletions
+81
-98
slapos/recipe/cmmi/README.rst
slapos/recipe/cmmi/README.rst
+71
-76
slapos/recipe/cmmi/tests.py
slapos/recipe/cmmi/tests.py
+10
-22
No files found.
slapos/recipe/cmmi/README.rst
View file @
3de46334
This diff is collapsed.
Click to expand it.
slapos/recipe/cmmi/tests.py
View file @
3de46334
...
...
@@ -328,24 +328,15 @@ class NonInformativeTests(unittest.TestCase):
self
.
assertTrue
(
os
.
path
.
exists
(
build_directory
))
def
test_suite
():
# Hash used in the test depend on the file:// url of the package, so
# we use re-normalizer to replace SHARED_PACKAGE_HASH with the actual
# hash for this path.
package_url
=
'file://%s/package-0.0.0.tar.gz'
%
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'testdata'
)
signature_FIRST_SHARED_PACKAGE_HASH
=
Signature
(
'.slapos.recipe.cmmi.signature'
)
signature_FIRST_SHARED_PACKAGE_HASH
.
update
(
'environment'
,
'FOO=bar'
)
signature_FIRST_SHARED_PACKAGE_HASH
.
update
(
'recipe'
,
'slapos.recipe.cmmi'
)
signature_FIRST_SHARED_PACKAGE_HASH
.
update
(
'shared'
,
'True'
)
signature_FIRST_SHARED_PACKAGE_HASH
.
update
(
'url'
,
package_url
)
signature_ANOTHER_SHARED_PACKAGE_HASH
=
Signature
(
'.slapos.recipe.cmmi.signature'
)
signature_ANOTHER_SHARED_PACKAGE_HASH
.
update
(
'change'
,
'True'
)
signature_ANOTHER_SHARED_PACKAGE_HASH
.
update
(
'recipe'
,
'slapos.recipe.cmmi'
)
signature_ANOTHER_SHARED_PACKAGE_HASH
.
update
(
'shared'
,
'True'
)
signature_ANOTHER_SHARED_PACKAGE_HASH
.
update
(
'url'
,
package_url
)
sums
=
[]
def
md5sum
(
m
):
x
=
m
.
group
(
0
)
try
:
i
=
sums
.
index
(
x
)
except
ValueError
:
i
=
len
(
sums
)
sums
.
append
(
x
)
return
'<MD5SUM:%s>'
%
i
suite
=
unittest
.
TestSuite
((
doctest
.
DocFileSuite
(
'README.rst'
,
...
...
@@ -361,10 +352,7 @@ def test_suite():
'
--
prefix
=/
shared
/
'),
(re.compile(r'
\
s
/
\
S
+
\
/
shared
\
/
'),
'
/
shared
/
'),
(re.compile('
FIRST_SHARED_PACKAGE_HASH
'),
signature_FIRST_SHARED_PACKAGE_HASH.hexdigest()),
(re.compile('
ANOTHER_SHARED_PACKAGE_HASH
'),
signature_ANOTHER_SHARED_PACKAGE_HASH.hexdigest()),
(re.compile('
[
0
-
9
a
-
f
]{
32
}
'), md5sum),
# Normalize subprocess.CalledProcessError message, on python >= 3.6
# there'
s
an
extra
.
at
the
end
.
(
re
.
compile
(
r'Command (.*) returned non-zero exit status (\
d+)[
\.]{0,1}'
),
...
...
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