Merge pull request #153578 from fabaff/fix-ansible-runner

python3Packages.ansible-runner: disable failing tests
This commit is contained in:
Fabian Affolter 2022-01-05 13:47:28 +01:00 committed by GitHub
commit f092a96c01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,30 +1,40 @@
{ lib
, buildPythonPackage
, fetchPypi
, psutil
, pexpect
, python-daemon
, pyyaml
, six
, stdenv
, ansible
, buildPythonPackage
, fetchPypi
, mock
, openssh
, pexpect
, psutil
, pytest-mock
, pytest-timeout
, pytest-xdist
, pytestCheckHook
, python-daemon
, pyyaml
, six
}:
buildPythonPackage rec {
pname = "ansible-runner";
version = "2.1.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "7684612f7543c5f07f3e8135667eeb22a9dbd98f625cc69901ba9924329ef24f";
hash = "sha256-doRhL3VDxfB/PoE1Zn7rIqnb2Y9iXMaZAbqZJDKe8k8=";
};
propagatedBuildInputs = [
ansible
psutil
pexpect
python-daemon
pyyaml
six
];
checkInputs = [
ansible # required to place ansible CLI onto the PATH in tests
pytestCheckHook
@ -35,44 +45,45 @@ buildPythonPackage rec {
openssh
];
propagatedBuildInputs = [
ansible
psutil
pexpect
python-daemon
pyyaml
six
];
preCheck = ''
export HOME=$(mktemp -d)
export PATH="$PATH:$out/bin";
'';
disabledTests = [
"test_callback_plugin_task_args_leak" # requires internet
# Requires network access
"test_callback_plugin_task_args_leak"
"test_env_accuracy"
"test_large_stdout_blob" # times out on slower hardware
]
# Times out on slower hardware
"test_large_stdout_blob"
# Failed: DID NOT RAISE <class 'RuntimeError'>
"test_validate_pattern"
] ++ lib.optional stdenv.isDarwin [
# test_process_isolation_settings is currently broken on Darwin Catalina
# https://github.com/ansible/ansible-runner/issues/413
++ lib.optional stdenv.isDarwin "process_isolation_settings";
"process_isolation_settings"
];
disabledTestPaths = [
# these tests unset PATH and then run executables like `bash` (see https://github.com/ansible/ansible-runner/pull/918)
# These tests unset PATH and then run executables like `bash` (see https://github.com/ansible/ansible-runner/pull/918)
"test/integration/test_runner.py"
"test/unit/test_runner.py"
]
++ lib.optionals stdenv.isDarwin [
# integration tests on Darwin are not regularly passing in ansible-runner's own CI
# Integration tests on Darwin are not regularly passing in ansible-runner's own CI
"test/integration"
# these tests write to `/tmp` which is not writable on Darwin
# These tests write to `/tmp` which is not writable on Darwin
"test/unit/config/test__base.py"
];
pythonImportsCheck = [
"ansible_runner"
];
meta = with lib; {
description = "Helps when interfacing with Ansible";
homepage = "https://github.com/ansible/ansible-runner";
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
maintainers = with maintainers; [ costrouc ];
};
}