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
1ac57a8a
Commit
1ac57a8a
authored
Nov 21, 2014
by
Rohan McGovern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_git: add tests for `refspec' argument
Includes a basic test of the clone and update cases.
parent
ade083a2
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 @
1ac57a8a
...
@@ -206,6 +206,41 @@
...
@@ -206,6 +206,41 @@
that
:
that
:
-
'
git_result.failed'
-
'
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
# 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