From 4eb013f5c00834a4b44ca748aab393728389ecb0 Mon Sep 17 00:00:00 2001 From: hulr <> Date: Sun, 26 Mar 2023 21:41:16 +0200 Subject: [PATCH 1/3] maintainers: add hulr --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a62699bad040..206ff5798e65 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6589,6 +6589,11 @@ fingerprint = "78C2 E81C 828A 420B 269A EBC1 49FA 39F8 A7F7 35F9"; }]; }; + hulr = { + github = "hulr"; + githubId = 17255815; + name = "hulr"; + }; humancalico = { email = "humancalico@disroot.org"; github = "humancalico"; From e27d87364098ea68e273b5f84cf64936cc19b83e Mon Sep 17 00:00:00 2001 From: hulr <> Date: Sun, 26 Mar 2023 21:41:33 +0200 Subject: [PATCH 2/3] python310Packages.pytest-testinfra: init at 8.1.0 https://github.com/pytest-dev/pytest-testinfra/releases/tag/8.1.0 --- .../pytest-testinfra/default.nix | 66 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 68 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-testinfra/default.nix diff --git a/pkgs/development/python-modules/pytest-testinfra/default.nix b/pkgs/development/python-modules/pytest-testinfra/default.nix new file mode 100644 index 000000000000..d18e7bda5496 --- /dev/null +++ b/pkgs/development/python-modules/pytest-testinfra/default.nix @@ -0,0 +1,66 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools-scm +, ansible-core +, paramiko +, pytestCheckHook +, pytest-xdist +, pywinrm +, salt +}: + +buildPythonPackage rec { + pname = "pytest-testinfra"; + version = "8.1.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-m0CCi1j7esK/8pzBRlk0rfQ08Q3VoQj2BTXe5SZgpj0="; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + nativeCheckInputs = [ + ansible-core + paramiko + pytestCheckHook + pytest-xdist + pywinrm + salt + ]; + + # markers don't get added when docker is not available (leads to warnings): + # https://github.com/pytest-dev/pytest-testinfra/blob/8.1.0/test/conftest.py#L228 + preCheck = '' + export HOME=$(mktemp -d) + sed -i '54imarkers = \ + \ttestinfra_hosts(host_selector): mark test to run on selected hosts \ + \tdestructive: mark test as destructive \ + \tskip_wsl: skip test on WSL, no systemd support' setup.cfg + ''; + + # docker is required for all disabled tests + disabledTests = [ + # test/test_backends.py + "test_command" + "test_encoding" + "test_ansible_any_error_fatal" + "test_user_connection" + "test_sudo" + "test_docker_encoding" + ]; + + disabledTestPaths = [ + "test/test_modules.py" + ]; + + meta = with lib; { + description = "Pytest plugin for testing your infrastructure"; + homepage = "https://github.com/pytest-dev/pytest-testinfra"; + license = licenses.asl20; + maintainers = with maintainers; [ hulr ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9e94dd8ce210..666bdf26d8a6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9718,6 +9718,8 @@ self: super: with self; { pytest-test-utils = callPackage ../development/python-modules/pytest-test-utils { }; + pytest-testinfra = callPackage ../development/python-modules/pytest-testinfra { }; + pytest-testmon = callPackage ../development/python-modules/pytest-testmon { }; pytest-timeout = callPackage ../development/python-modules/pytest-timeout { }; From 7bff033522e984ba42b4823cac43c35cf152def6 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 18 Jun 2023 20:15:33 +0200 Subject: [PATCH 3/3] python310Packages.pytest-testinfra: fix formatting --- pkgs/development/python-modules/pytest-testinfra/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pytest-testinfra/default.nix b/pkgs/development/python-modules/pytest-testinfra/default.nix index d18e7bda5496..c4fbeb466b1f 100644 --- a/pkgs/development/python-modules/pytest-testinfra/default.nix +++ b/pkgs/development/python-modules/pytest-testinfra/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { \ttestinfra_hosts(host_selector): mark test to run on selected hosts \ \tdestructive: mark test as destructive \ \tskip_wsl: skip test on WSL, no systemd support' setup.cfg - ''; + ''; # docker is required for all disabled tests disabledTests = [