From caefd1615b2232ea7c49fcc25fb42f6980f6cd82 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Mon, 12 Feb 2024 11:35:21 +0100 Subject: [PATCH] molecule: add version test --- pkgs/development/python-modules/molecule/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/molecule/default.nix b/pkgs/development/python-modules/molecule/default.nix index 79d7b56984b5..6b46ae62258c 100644 --- a/pkgs/development/python-modules/molecule/default.nix +++ b/pkgs/development/python-modules/molecule/default.nix @@ -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";