From 217622fce114958b6e3d3ef21a924ab7be63260f Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Wed, 3 Aug 2016 21:41:05 +0300
Subject: [PATCH] - Corrected location of roles for newer versions of Molecule,
 updated README on   how to install roles. - Corrected privilege escalation in
 tests, added example.

---
 README.rst            | 2 +-
 ansible.cfg           | 2 +-
 tests/test_example.py | 4 ++++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/README.rst b/README.rst
index 34a183a..06fb1d6 100644
--- a/README.rst
+++ b/README.rst
@@ -32,7 +32,7 @@ To install the dependencies:
 
 .. code:: shell
 
-    ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD)
+    ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles
 
 To run the full test suite:
 
diff --git a/ansible.cfg b/ansible.cfg
index e9ff55d..e25faf8 100644
--- a/ansible.cfg
+++ b/ansible.cfg
@@ -1,6 +1,6 @@
 [defaults]
 host_key_checking = False
 retry_files_enabled = False
-roles_path = .molecule/roles:../
+roles_path = roles:../../
 command_warnings = True
 deprecation_warnings = True
diff --git a/tests/test_example.py b/tests/test_example.py
index 9cabf24..a38c7ba 100644
--- a/tests/test_example.py
+++ b/tests/test_example.py
@@ -1,2 +1,6 @@
 def test_example(Command):
     assert Command('uname').rc == 0
+
+def test_root(Command, Sudo):
+    with Sudo():
+        assert Command('whoami').stdout == 'root'
-- 
GitLab