Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
cb64cd5a
Commit
cb64cd5a
authored
Dec 22, 2014
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9860 from rohanpm/test_git_refspec
test_git: add tests for `refspec' argument
parents
241be0d6
1ac57a8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
test/integration/roles/test_git/tasks/main.yml
+35
-0
No files found.
test/integration/roles/test_git/tasks/main.yml
View file @
cb64cd5a
...
...
@@ -206,6 +206,41 @@
that
:
-
'
git_result.failed'
# Same as the previous test, but this time we specify which ref
# contains the SHA1
-
name
:
update to revision by specifying the refspec
git
:
repo
:
https://github.com/ansible/ansible-examples.git
dest
:
'
{{
checkout_dir
}}'
version
:
2cfde3668b8bb10fbe2b9d5cec486025ad8cc51b
refspec
:
refs/pull/7/merge
-
name
:
check HEAD after update with refspec
command
:
git rev-parse HEAD chdir="{{ checkout_dir }}"
register
:
git_result
-
assert
:
that
:
-
'
git_result.stdout
==
"2cfde3668b8bb10fbe2b9d5cec486025ad8cc51b"'
-
name
:
clear checkout_dir
file
:
state=absent path={{ checkout_dir }}
-
name
:
clone to revision by specifying the refspec
git
:
repo
:
https://github.com/ansible/ansible-examples.git
dest
:
'
{{
checkout_dir
}}'
version
:
2cfde3668b8bb10fbe2b9d5cec486025ad8cc51b
refspec
:
refs/pull/7/merge
-
name
:
check HEAD after update with refspec
command
:
git rev-parse HEAD chdir="{{ checkout_dir }}"
register
:
git_result
-
assert
:
that
:
-
'
git_result.stdout
==
"2cfde3668b8bb10fbe2b9d5cec486025ad8cc51b"'
#
# Submodule tests
#
...
...
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