molecule: add version test
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user