diff --git a/molecule_ec2/test/functional/test_ec2.py b/molecule_ec2/test/functional/test_ec2.py index 8bac2c3..899f341 100644 --- a/molecule_ec2/test/functional/test_ec2.py +++ b/molecule_ec2/test/functional/test_ec2.py @@ -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 @@ -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): @@ -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 diff --git a/setup.cfg b/setup.cfg index 34a8240..53f1a65 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 @@ -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 @@ -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 @@ -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 = diff --git a/tox.ini b/tox.ini index 4d02af2..e75db5a 100644 --- a/tox.ini +++ b/tox.ini @@ -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] @@ -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