Add tests for git update recipe

parent a15641a2
...@@ -295,6 +295,13 @@ Let's take a look at the buildout parts directory now:: ...@@ -295,6 +295,13 @@ Let's take a look at the buildout parts directory now::
d buildout d buildout
d git-clone d git-clone
When updating, it will do a "git fetch; git reset @{upstream}"::
>>> print system(buildout)
Updating git-clone.
Fetching origin
HEAD is now at ...
Specific branch Specific branch
--------------- ---------------
...@@ -331,6 +338,14 @@ And let's see that current branch is "build":: ...@@ -331,6 +338,14 @@ And let's see that current branch is "build"::
>>> subprocess.check_output(['git', 'branch']) >>> subprocess.check_output(['git', 'branch'])
'* build\n' '* build\n'
When updating, it will do a "git fetch; git reset build"::
>>> cd(sample_buildout)
>>> print system(buildout)
Updating git-clone.
Fetching origin
HEAD is now at ...
Specific revision Specific revision
----------------- -----------------
...@@ -369,6 +384,14 @@ And let's see that current branch is "gitclone":: ...@@ -369,6 +384,14 @@ And let's see that current branch is "gitclone"::
>>> subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']) >>> subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'])
'2566127\n' '2566127\n'
When updating, it will do a "git fetch; git reset revision"::
>>> cd(sample_buildout)
>>> print system(buildout)
Updating git-clone.
Fetching origin
HEAD is now at ...
Specific git binary Specific git binary
------------------- -------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment