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

Commit 14cea25

Browse files
authored
Make driver compatible with molecule 3.2 (#29)
1 parent 1acf2de commit 14cea25

File tree

3 files changed

+19
-37
lines changed

3 files changed

+19
-37
lines changed

molecule_ec2/test/functional/test_ec2.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
import sh
2525

2626
from molecule import logger
27-
from molecule.test.conftest import run_command, change_dir_to
27+
from molecule.util import run_command
28+
from molecule.test.conftest import change_dir_to
2829
from molecule.test.functional.conftest import metadata_lint_update
2930

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

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

5354
assert os.path.isdir(scenario_directory)
5455

5556
cmd = sh.molecule.bake("test", "-s", "test-scenario")
56-
run_command(cmd)
57+
assert run_command(cmd).returncode == 0

setup.cfg

+6-25
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[aliases]
22
dists = clean --all sdist bdist_wheel
33

4-
[bdist_wheel]
5-
universal = 1
6-
74
[metadata]
85
name = molecule-ec2
96
url = https://github.com/ansible-community/molecule-ec2
@@ -31,12 +28,11 @@ classifiers =
3128
License :: OSI Approved :: MIT License
3229
Natural Language :: English
3330
Operating System :: OS Independent
34-
Programming Language :: Python :: 2
35-
Programming Language :: Python :: 2.7
3631
Programming Language :: Python :: 3
37-
Programming Language :: Python :: 3.5
3832
Programming Language :: Python :: 3.6
3933
Programming Language :: Python :: 3.7
34+
Programming Language :: Python :: 3.8
35+
Programming Language :: Python :: 3.9
4036

4137
Topic :: System :: Systems Administration
4238
Topic :: Utilities
@@ -53,7 +49,7 @@ keywords =
5349

5450
[options]
5551
use_scm_version = True
56-
python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
52+
python_requires = >=3.6
5753
packages = find:
5854
include_package_data = True
5955
zip_safe = False
@@ -65,28 +61,13 @@ setup_requires =
6561

6662
# These are required in actual runtime:
6763
install_requires =
68-
ansible >= 2.9.5
69-
molecule >= 3.0.2
64+
molecule >= 3.2.0a0
7065
pyyaml >= 5.1, < 6
71-
boto
72-
boto3
66+
boto3; platform_system == "Windows"
7367

7468
[options.extras_require]
7569
test =
76-
ansi2html # soft-dependency of pytest-html
77-
flake8>=3.6.0, < 4
78-
79-
mock>=3.0.5, < 4
80-
pytest>=4.6.3, < 5
81-
pytest-cov>=2.7.1, < 3
82-
pytest-helpers-namespace>=2019.1.8, < 2020
83-
pytest-html
84-
pytest-mock>=1.10.4, < 2
85-
pytest-plus
86-
pytest-verbose-parametrize>=1.7.0, < 2
87-
pytest-xdist>=1.29.0, < 2
88-
pytest-dependency
89-
shade>=1.31.0, < 2
70+
molecule[test]
9071

9172
[options.entry_points]
9273
molecule.driver =

tox.ini

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
minversion = 3.9.0
44
envlist =
55
lint
6-
devel
6+
77
packaging
8-
py{27,35,36,37,38}
9-
skipsdist = True
10-
skip_missing_interpreters = True
8+
py{36,37,38,39}
9+
py{36,37,38,39}-{devel}
10+
11+
# do not enable skip missing to avoid CI false positives
12+
skip_missing_interpreters = False
1113
isolated_build = True
1214

1315
[testenv]
@@ -19,10 +21,8 @@ commands =
1921
pytest --collect-only
2022
pytest --color=yes {tty:-s}
2123
deps =
22-
devel: git+https://github.com/pytest-dev/pytest-html.git
23-
devel: git+https://github.com/ansible/molecule#egg=molecule
24-
devel: git+https://github.com/ansible/ansible.git#egg=ansible
25-
24+
py{36,37,38,39}: molecule[test]
25+
py{36,37,38,39}-{devel}: git+https://github.com/ansible-community/molecule.git@master#egg=molecule[test]
2626
setenv =
2727
ANSIBLE_FORCE_COLOR={env:ANSIBLE_FORCE_COLOR:1}
2828
ANSIBLE_INVENTORY={toxinidir}/tests/hosts.ini

0 commit comments

Comments
 (0)