-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump ansible to 2.17, raise ninimum python to 3.7 (#200)
bump ansible+python to 2.17+3.7, update distros with the ansible-2.17 release, python 2 and 3.6 have been removed from the officially supported list. We therefore have to upgrade our minimum tested version to 3.7, which is a breaking change as it requires removing official support for RockyLinux 8. Also use this opportunity to add support for Ubuntu 24.04.
- Loading branch information
Showing
6 changed files
with
47 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,18 @@ | ||
# pylint: disable=redefined-outer-name | ||
|
||
from pathlib import Path | ||
|
||
from jinja2 import Environment, FileSystemLoader | ||
|
||
INTEGRATION_CONFIG_DIR = Path("tests/integration/") | ||
INTEGRATION_CONFIG_TEMPLATE = "integration_config.yml.j2" | ||
INTEGRATION_CONFIG_FILE = "integration_config.yml" | ||
|
||
|
||
def render_integration_config(template, dest: Path, **kwargs): | ||
env = Environment(loader=FileSystemLoader(INTEGRATION_CONFIG_DIR)) | ||
template = env.get_template(template) | ||
content = template.render(**kwargs) | ||
with open(dest, "w", encoding="utf-8") as f: | ||
f.write(f"{content}\n") | ||
|
||
|
||
def test_plugins_integration(test_versions, remote_caddy_container, collection_test_env): | ||
render_integration_config( | ||
INTEGRATION_CONFIG_TEMPLATE, | ||
collection_test_env.cwd / "tests" / "integration" / INTEGRATION_CONFIG_FILE, | ||
admin_url=remote_caddy_container.caddy_url, | ||
) | ||
|
||
collection_test_env.run([ | ||
"ansible-test", "integration", "--color", "-v", | ||
"--controller", "docker:default", | ||
"--target", f"docker:default,python={test_versions.node_python_version}", | ||
"--docker-network", remote_caddy_container.ct_network, | ||
]) | ||
|
||
|
||
def test_plugins_sanity(collection_test_env, test_versions): | ||
collection_test_env.run([ | ||
params = [ | ||
"ansible-test", | ||
"sanity", "--docker", "--color", "-v", | ||
"--python", test_versions.node_python_version, | ||
]) | ||
] | ||
|
||
if int(test_versions.ansible_version.split(".")[1]) <= 16: | ||
# these flags are only valid with ansible-test 2.16 and older, as they refer to python 2.7. | ||
# Do not include them with newer versions of ansible-test | ||
params.extend([ | ||
"--skip-test", "metaclass-boilerplate", | ||
"--skip-test", "future-import-boilerplate" | ||
]) | ||
|
||
collection_test_env.run(params) |