Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
Make driver compatible with molecule 3.2 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Oct 29, 2020
1 parent 1acf2de commit 14cea25
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 37 deletions.
9 changes: 5 additions & 4 deletions molecule_ec2/test/functional/test_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
import sh

from molecule import logger
from molecule.test.conftest import run_command, change_dir_to
from molecule.util import run_command
from molecule.test.conftest import change_dir_to
from molecule.test.functional.conftest import metadata_lint_update

# import change_dir_to, temp_dir
Expand All @@ -37,7 +38,7 @@ def test_command_init_scenario(temp_dir):
role_directory = os.path.join(temp_dir.strpath, "test-init")
options = {}
cmd = sh.molecule.bake("init", "role", "test-init", **options)
run_command(cmd)
assert run_command(cmd).returncode == 0
metadata_lint_update(role_directory)

with change_dir_to(role_directory):
Expand All @@ -48,9 +49,9 @@ def test_command_init_scenario(temp_dir):
"driver-name": "ec2",
}
cmd = sh.molecule.bake("init", "scenario", "test-scenario", **options)
run_command(cmd)
assert run_command(cmd).returncode == 0

assert os.path.isdir(scenario_directory)

cmd = sh.molecule.bake("test", "-s", "test-scenario")
run_command(cmd)
assert run_command(cmd).returncode == 0
31 changes: 6 additions & 25 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[aliases]
dists = clean --all sdist bdist_wheel

[bdist_wheel]
universal = 1

[metadata]
name = molecule-ec2
url = https://github.com/ansible-community/molecule-ec2
Expand Down Expand Up @@ -31,12 +28,11 @@ classifiers =
License :: OSI Approved :: MIT License
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9

Topic :: System :: Systems Administration
Topic :: Utilities
Expand All @@ -53,7 +49,7 @@ keywords =

[options]
use_scm_version = True
python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
python_requires = >=3.6
packages = find:
include_package_data = True
zip_safe = False
Expand All @@ -65,28 +61,13 @@ setup_requires =

# These are required in actual runtime:
install_requires =
ansible >= 2.9.5
molecule >= 3.0.2
molecule >= 3.2.0a0
pyyaml >= 5.1, < 6
boto
boto3
boto3; platform_system == "Windows"

[options.extras_require]
test =
ansi2html # soft-dependency of pytest-html
flake8>=3.6.0, < 4

mock>=3.0.5, < 4
pytest>=4.6.3, < 5
pytest-cov>=2.7.1, < 3
pytest-helpers-namespace>=2019.1.8, < 2020
pytest-html
pytest-mock>=1.10.4, < 2
pytest-plus
pytest-verbose-parametrize>=1.7.0, < 2
pytest-xdist>=1.29.0, < 2
pytest-dependency
shade>=1.31.0, < 2
molecule[test]

[options.entry_points]
molecule.driver =
Expand Down
16 changes: 8 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
minversion = 3.9.0
envlist =
lint
devel

packaging
py{27,35,36,37,38}
skipsdist = True
skip_missing_interpreters = True
py{36,37,38,39}
py{36,37,38,39}-{devel}

# do not enable skip missing to avoid CI false positives
skip_missing_interpreters = False
isolated_build = True

[testenv]
Expand All @@ -19,10 +21,8 @@ commands =
pytest --collect-only
pytest --color=yes {tty:-s}
deps =
devel: git+https://github.com/pytest-dev/pytest-html.git
devel: git+https://github.com/ansible/molecule#egg=molecule
devel: git+https://github.com/ansible/ansible.git#egg=ansible

py{36,37,38,39}: molecule[test]
py{36,37,38,39}-{devel}: git+https://github.com/ansible-community/molecule.git@master#egg=molecule[test]
setenv =
ANSIBLE_FORCE_COLOR={env:ANSIBLE_FORCE_COLOR:1}
ANSIBLE_INVENTORY={toxinidir}/tests/hosts.ini
Expand Down

0 comments on commit 14cea25

Please sign in to comment.