Unverified Commit caefd161 authored by Dawid Dziurla's avatar Dawid Dziurla
Browse files

molecule: add version test

parent 8188b29b
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
{ 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";