Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gitolite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ansible
gitolite
Commits
82fb23c5
Commit
82fb23c5
authored
8 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
- Run Molecule tests with Docker in Travis CI.
parent
0403b5d3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.travis.yml
+2
-0
2 additions, 0 deletions
.travis.yml
README.rst
+3
-8
3 additions, 8 deletions
README.rst
molecule.yml
+6
-0
6 additions, 0 deletions
molecule.yml
tests/requirements.txt
+1
-0
1 addition, 0 deletions
tests/requirements.txt
tests/test_example.py
+6
-1
6 additions, 1 deletion
tests/test_example.py
with
18 additions
and
9 deletions
.travis.yml
+
2
−
0
View file @
82fb23c5
...
...
@@ -4,6 +4,7 @@ python: "2.7"
dist
:
trusty
sudo
:
false
group
:
beta
services
:
[
docker
]
install
:
-
pip install -r tests/requirements.txt
...
...
@@ -12,6 +13,7 @@ install:
script
:
-
pre-commit run --all-files
-
molecule test --driver docker
notifications
:
webhooks
:
https://galaxy.ansible.com/api/v1/notifications/
This diff is collapsed.
Click to expand it.
README.rst
+
3
−
8
View file @
82fb23c5
...
...
@@ -29,8 +29,9 @@ See :code:`tests/playbook.yml`.
Testing
-------
Testing requires Virtualbox, Vagrant and Python 2.7. Install the Python
dependencies, dependent roles and roles required for testing:
Testing requires Python 2.7 and either Docker or Vagrant and Virtualbox.
Install the Python dependencies, dependent roles and roles required for
testing:
.. code:: shell
...
...
@@ -58,9 +59,3 @@ Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website
<https://www.shore.co.il/>`_. Patches are welcome via `git send-email
<http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located
at: https://www.shore.co.il/git/.
TODO
----
- Perform pre-commit tests in TravisCI.
- Perform Molecule tests using Docker (just Linux) in TravisCI.
This diff is collapsed.
Click to expand it.
molecule.yml
+
6
−
0
View file @
82fb23c5
...
...
@@ -27,3 +27,9 @@ vagrant:
-
'
vbguest.auto_update
=
false'
-
'
landrush.enabled
=
false'
-
'
landrush_ip.override
=
false'
docker
:
containers
:
-
name
:
ansible-role-example-ubuntu
image
:
ubuntu
image_version
:
xenial
This diff is collapsed.
Click to expand it.
tests/requirements.txt
+
1
−
0
View file @
82fb23c5
...
...
@@ -5,3 +5,4 @@ ansible-lint==3.4.4
pre-commit==0.9.3
piprot==0.9.7
python-vagrant==0.5.14
docker-py==1.10.6
This diff is collapsed.
Click to expand it.
tests/test_example.py
+
6
−
1
View file @
82fb23c5
from
testinfra.utils.ansible_runner
import
AnsibleRunner
testinfra_hosts
=
AnsibleRunner
(
'
.molecule/ansible_inventory
'
).
get_hosts
(
'
all
'
)
def
test_example
(
Command
):
assert
Command
(
'
uname
'
).
rc
==
0
def
test_root
(
Command
,
Sudo
):
with
Sudo
():
assert
Command
(
'
whoami
'
).
stdout
==
'
root
'
assert
Command
(
'
whoami
'
).
stdout
.
strip
()
==
'
root
'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment