molecule: add version test

This commit is contained in:
Dawid Dziurla
2024-02-12 11:35:21 +01:00
parent 8188b29b88
commit caefd1615b
@@ -1,11 +1,13 @@
{ lib
, buildPythonPackage
, fetchPypi
, testers
, ansible-compat
, ansible-core
, click-help-colors
, enrich
, jsonschema
, molecule
, withPlugins ? true, molecule-plugins
, packaging
, pluggy
@@ -51,6 +53,14 @@ buildPythonPackage rec {
# tests can't be easily run without installing things from ansible-galaxy
doCheck = false;
passthru.tests.version = (testers.testVersion {
package = molecule;
command = "PY_COLORS=0 ${pname} --version";
}).overrideAttrs (old: {
# workaround the error: Permission denied: '/homeless-shelter'
HOME = "$(mktemp -d)";
});
meta = with lib; {
description = "Molecule aids in the development and testing of Ansible roles";
homepage = "https://github.com/ansible-community/molecule";