Skip to content

Commit

Permalink
Set correct default directory for tests (#2732)
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoder-deloitte committed Jul 7, 2020
1 parent a485021 commit 3437e45
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions molecule/test/unit/verifier/test_ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def test_enabled_property(_instance):

def test_directory_property(_instance):
parts = _instance.directory.split(os.path.sep)
# default verifier is ansible, which keeps tests in molecule folder.
assert "molecule" == parts[-1]
# Unused by Ansible verifier
assert ["molecule", "default", "tests"] == parts[-3:]


@pytest.mark.parametrize("config_instance", ["_verifier_section_data"], indirect=True)
Expand Down
2 changes: 1 addition & 1 deletion molecule/verifier/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def enabled(self):
def directory(self):
return os.path.join(
self._config.scenario.directory,
self._config.config["verifier"].get("directory", "molecule"),
self._config.config["verifier"].get("directory", "tests"),
)

@property
Expand Down
7 changes: 0 additions & 7 deletions molecule/verifier/testinfra.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,6 @@ def default_options(self):

return d

@property
def directory(self):
return os.path.join(
self._config.scenario.directory,
self._config.config["verifier"].get("directory", "tests"),
)

# NOTE(retr0h): Override the base classes' options() to handle
# ``ansible-galaxy`` one-off.
@property
Expand Down

0 comments on commit 3437e45

Please sign in to comment.