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.template
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.recipe.template
Commits
40270cb5
Commit
40270cb5
authored
Jul 03, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests
parent
6219b5dc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
51 deletions
+15
-51
setup.py
setup.py
+3
-0
slapos/recipe/template/README.jinja2.txt
slapos/recipe/template/README.jinja2.txt
+6
-37
slapos/recipe/template/README.txt
slapos/recipe/template/README.txt
+1
-13
slapos/recipe/template/tests.py
slapos/recipe/template/tests.py
+5
-1
No files found.
setup.py
View file @
40270cb5
...
@@ -28,6 +28,9 @@ setup(name=name,
...
@@ -28,6 +28,9 @@ setup(name=name,
'zc.buildout'
,
# plays with buildout
'zc.buildout'
,
# plays with buildout
'jinja2>=2.7'
,
'jinja2>=2.7'
,
],
],
tests_require
=
[
'zope.testing'
,
],
zip_safe
=
True
,
zip_safe
=
True
,
entry_points
=
{
entry_points
=
{
'zc.buildout'
:
[
'zc.buildout'
:
[
...
...
slapos/recipe/template/README.jinja2.txt
View file @
40270cb5
...
@@ -48,8 +48,6 @@ We run buildout::
...
@@ -48,8 +48,6 @@ We run buildout::
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
And the template has been rendered::
And the template has been rendered::
...
@@ -182,8 +180,6 @@ Use jinja2 extensions
...
@@ -182,8 +180,6 @@ Use jinja2 extensions
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Uninstalling template.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('foo')
>>> cat('foo')
foo, template
foo, template
...
@@ -211,8 +207,6 @@ Compute template's MD5 sum::
...
@@ -211,8 +207,6 @@ Compute template's MD5 sum::
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Uninstalling template.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('foo')
>>> cat('foo')
template
template
...
@@ -232,12 +226,10 @@ If the md5sum doesn't match, the buildout fail::
...
@@ -232,12 +226,10 @@ If the md5sum doesn't match, the buildout fail::
... md5sum = 0123456789abcdef0123456789abcdef
... md5sum = 0123456789abcdef0123456789abcdef
... ''')
... ''')
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Not found: /tmp/.../zc.buildout/
Uninstalling template.
Not found: /tmp/.../zc.buildout/
Installing template.
While:
While:
Installing.
Installing template.
Getting section template.
Initializing section template.
Error: MD5 checksum mismatch for local resource at 'foo.in'.
Error: MD5 checksum mismatch for local resource at 'foo.in'.
...
@@ -260,10 +252,7 @@ You can specify the mode for rendered file::
...
@@ -260,10 +252,7 @@ You can specify the mode for rendered file::
... mode = 205
... mode = 205
... ''')
... ''')
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
And the generated file with have the right permissions::
And the generated file with have the right permissions::
...
@@ -302,8 +291,6 @@ imported::
...
@@ -302,8 +291,6 @@ imported::
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Uninstalling template.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('bar')
>>> cat('bar')
FOO !
FOO !
...
@@ -325,8 +312,6 @@ Just like context definition, it also works with indirect values::
...
@@ -325,8 +312,6 @@ Just like context definition, it also works with indirect values::
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Uninstalling template.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('bar')
>>> cat('bar')
FOO !
FOO !
...
@@ -371,8 +356,6 @@ All templates can be accessed inside both folders::
...
@@ -371,8 +356,6 @@ All templates can be accessed inside both folders::
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Uninstalling template.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('bar')
>>> cat('bar')
a1foo
a1foo
a2foo
a2foo
...
@@ -411,8 +394,6 @@ path)::
...
@@ -411,8 +394,6 @@ path)::
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Uninstalling template.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('bar')
>>> cat('bar')
a1foo
a1foo
a2foo
a2foo
...
@@ -446,8 +427,6 @@ will be installed as dependency::
...
@@ -446,8 +427,6 @@ will be installed as dependency::
foobar='dependency content'
foobar='dependency content'
recipe='zc.buildout:debug'
recipe='zc.buildout:debug'
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
This way you can get options which are computed in the ``__init__`` of
This way you can get options which are computed in the ``__init__`` of
the dependent recipe.
the dependent recipe.
...
@@ -496,13 +475,11 @@ Let's just use ``buildout.cfg`` using this egg::
...
@@ -496,13 +475,11 @@ Let's just use ``buildout.cfg`` using this egg::
... recipe = samplerecipe
... recipe = samplerecipe
... ''')
... ''')
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Develop:
...
Develop:
'/sample-buildout/.'
Uninstalling template.
Uninstalling template.
Uninstalling dependency.
Uninstalling dependency.
Installing sample.
Installing sample.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('foo')
>>> cat('foo')
foobar
foobar
...
@@ -527,18 +504,14 @@ rendering.
...
@@ -527,18 +504,14 @@ rendering.
... rendered = foo_once
... rendered = foo_once
... once = foo_flag
... once = foo_flag
... ''')
... ''')
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
# doctest: +ELLIPSIS
Uninstalling template.
Uninstalling template.
Uninstalling sample.
Uninstalling sample.
Getting distribution for 'samplerecipe'.
Getting distribution for 'samplerecipe'.
Got samplerecipe 0.0.0.
Got samplerecipe 0.0.0.
Installing template.
Installing template.
The template install returned None. A path or iterable os paths should be returned.
The template install returned None. A path or iterable os paths should be returned.
Not found: /tmp/.../zc.buildout/
warning: install_lib: '...' does not exist -- no Python modules to install
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../samplerecipe/
Not found: /tmp/.../samplerecipe/
warning: install_lib: 'build/lib' does not exist -- no Python modules to install
<BLANKLINE>
<BLANKLINE>
zip_safe flag not set; analyzing archive contents...
zip_safe flag not set; analyzing archive contents...
...
@@ -562,8 +535,6 @@ Remove rendered file and re-render::
...
@@ -562,8 +535,6 @@ Remove rendered file and re-render::
Installing template.
Installing template.
The template install returned None. A path or iterable os paths should be returned.
The template install returned None. A path or iterable os paths should be returned.
Unused options for template: 'extra'.
Unused options for template: 'extra'.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
Template was not rendered::
Template was not rendered::
...
@@ -579,8 +550,6 @@ Removing the canary allows template to be re-rendered::
...
@@ -579,8 +550,6 @@ Removing the canary allows template to be re-rendered::
Installing template.
Installing template.
The template install returned None. A path or iterable os paths should be returned.
The template install returned None. A path or iterable os paths should be returned.
Unused options for template: 'extra'.
Unused options for template: 'extra'.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('foo_once')
>>> cat('foo_once')
dummy
dummy
slapos/recipe/template/README.txt
View file @
40270cb5
...
@@ -28,8 +28,6 @@ We run buildout::
...
@@ -28,8 +28,6 @@ We run buildout::
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
And the output file has been parsed by buildout itself::
And the output file has been parsed by buildout itself::
...
@@ -78,8 +76,6 @@ And run buildout, and see the result::
...
@@ -78,8 +76,6 @@ And run buildout, and see the result::
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Uninstalling template.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('template.out')
>>> cat('template.out')
template
template
...
@@ -98,8 +94,6 @@ If the md5sum doesn't match, the buildout fail::
...
@@ -98,8 +94,6 @@ If the md5sum doesn't match, the buildout fail::
... md5sum = 0123456789abcdef0123456789abcdef
... md5sum = 0123456789abcdef0123456789abcdef
... ''')
... ''')
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
While:
While:
Installing.
Installing.
Getting section template.
Getting section template.
...
@@ -129,8 +123,6 @@ You can specify the mode of the written file::
...
@@ -129,8 +123,6 @@ You can specify the mode of the written file::
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Uninstalling template.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
And the generated file with have the right permissions::
And the generated file with have the right permissions::
...
@@ -166,8 +158,6 @@ will be installed as dependency::
...
@@ -166,8 +158,6 @@ will be installed as dependency::
foobar='dependency content'
foobar='dependency content'
recipe='zc.buildout:debug'
recipe='zc.buildout:debug'
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
This way you can get options which are computed in the ``__init__`` of
This way you can get options which are computed in the ``__init__`` of
the dependent recipe.
the dependent recipe.
...
@@ -215,12 +205,10 @@ Let's just use ``buildout.cfg`` using this egg::
...
@@ -215,12 +205,10 @@ Let's just use ``buildout.cfg`` using this egg::
... recipe = samplerecipe
... recipe = samplerecipe
... ''')
... ''')
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Develop:
...
Develop:
'/sample-buildout/.'
Uninstalling template.
Uninstalling template.
Uninstalling dependency.
Uninstalling dependency.
Installing sample.
Installing sample.
Installing template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('template.out')
>>> cat('template.out')
foobar
foobar
slapos/recipe/template/tests.py
View file @
40270cb5
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
import
doctest
import
doctest
import
unittest
import
unittest
from
zc.buildout
import
testing
from
zc.buildout
import
testing
from
zope.testing
import
renormalizing
def
setUp
(
test
):
def
setUp
(
test
):
testing
.
buildoutSetUp
(
test
)
testing
.
buildoutSetUp
(
test
)
...
@@ -38,7 +39,10 @@ def test_suite():
...
@@ -38,7 +39,10 @@ def test_suite():
filename
,
filename
,
setUp
=
setUp
,
setUp
=
setUp
,
tearDown
=
testing
.
buildoutTearDown
,
tearDown
=
testing
.
buildoutTearDown
,
optionflags
=
(
doctest
.
ELLIPSIS
|
doctest
.
NORMALIZE_WHITESPACE
),
checker
=
renormalizing
.
RENormalizing
((
testing
.
normalize_path
,
testing
.
not_found
,
)),
)
for
filename
in
[
)
for
filename
in
[
'README.txt'
,
'README.txt'
,
'README.jinja2.txt'
,
'README.jinja2.txt'
,
...
...
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