Tests: unit
# Dependencies sourced from:
# - test/lib/ansible_test/_data/requirements/units.txt
# - test/units/requirements.txt
Depends: @,
         git,
         python3-cryptography,
         python3-jinja2,
         python3-passlib,
         python3-pexpect,
         python3-pytest,
         python3-pytest-mock,
         python3-pytest-forked,
         python3-pytest-xdist,
         python3-systemd,
         python3-tz,
         python3-winrm,
         python3-yaml

# integration tests that can run as unpriviliged user
Tests: ansible-test-integration.py
Depends: @,
         #bsdextrautils,
         cargo,                     # needed to build cryptography on some architectures, which some tests install from PyPI
         debconf-utils,             # debconf
         file,                      # stat
         gcc,                       # needed to build cffi on some architectures, which some tests install from PyPI
         git,                       # used by most tests
         #gnupg,
         gzip,                      # integration test git
         iptables,                  # integration test iptables
         #iproute2,
         libffi-dev,                # needed to build cffi on some architectures, which some tests install from PyPI
         libssl-dev,                # needed to build cryptography on some architectures, which some tests install from PyPI
         libyaml-dev,               # needed to build PyYAML on some architectures, which some tests install from PyPI
         locales,
         pkg-config,                # needed to build cryptography on some architectures, which some tests install from PyPI
         #procps,
         python3-apt,               # needed for checking if packages are installed
         #python3-cryptography,
         python3-dev,               # needed to build cffi on some architectures, which some tests install from PyPI
         python3-distlib,           # ansible-galaxy-collection-cli
         #python3-jinja2,
         #python3-junit.xml,
         #python3-mock,
         python3-passlib,            # grep 'setup/always/setup_passlib' test/integration/targets/*/aliases
         python3-pexpect,            # grep 'setup/always/setup_pexpect' test/integration/targets/*/aliases
         python3-pip,               # ansible-test-config, builtin_vars_prompt, remove again and fix tests
         #python3-pycryptodome,
         python3-pytest,            # ansible-test-units-assertions
         python3-pytest-mock,       # ansible-test-units-assertions
         #python3-pytest-xdist,
         #python3-systemd,
         #python3-tz,
         python3-venv,              # ansible-inventory; ./test/lib/ansible_test/_util/target/injector/virtualenv.sh
         python3-virtualenv,        # ansible-inventory, ansible-test-installed; ./test/lib/ansible_test/_util/target/injector/virtualenv.sh
         #python3-winrm,
         python3-yaml,              # ansible-test-units-forked
         #pwsh,                      # ansible-test-sanity-validate-modules, see RFP bug https://bugs.debian.org/834756,
         #rsync,
         sudo,                      # needed for testbed-setup.sh
         tar,                       # integration test git
         unzip,                     # integration test git
         zip,                       # integration test git
Restrictions:
  allow-stderr,     # lots of STDERR output
  needs-internet,   # used for ansible-galaxy and pip tests
  needs-sudo,       # used to call testbed-setup.sh

# integration tests that require root
Test-Command: ./debian/tests/ansible-test-integration.py --no-default-tests --requires-root --no-requires-apt-mark-manual
Features: test-name=ansible-test-integration-requires-root
Depends: @,
         #bsdextrautils,
         cargo,                     # needed to build cryptography on some architectures, which some tests install from PyPI
         debconf-utils,             # debconf
         file,                      # stat
         gcc,                       # needed to build cffi on some architectures, which some tests install from PyPI
         git,                       # used by most tests
         gnupg,                     # integration test apt-key
         gzip,                      # integration test git
         iptables,                  # integration test iptables
         #iproute2,
         libffi-dev,                # needed to build cffi on some architectures, which some tests install from PyPI
         libssl-dev,                # needed to build cryptography on some architectures, which some tests install from PyPI
         libyaml-dev,               # needed to build PyYAML on some architectures, which some tests install from PyPI
         locales,
         pkg-config,                # needed to build cryptography on some architectures, which some tests install from PyPI
         #procps,
         python3-apt,               # needed for checking if packages are installed
         #python3-cryptography,
         python3-dev,               # needed to build cffi on some architectures, which some tests install from PyPI
         python3-distlib,           # ansible-galaxy-collection-cli
         #python3-jinja2,
         #python3-junit.xml,
         #python3-mock,
         python3-passlib,            # grep 'setup/always/setup_passlib' test/integration/targets/*/aliases
         python3-pexpect,            # grep 'setup/always/setup_pexpect' test/integration/targets/*/aliases
         python3-pip,               # ansible-test-config, builtin_vars_prompt, remove again and fix tests
         #python3-pycryptodome,
         python3-pytest,            # ansible-test-units-assertions
         python3-pytest-mock,       # ansible-test-units-assertions
         #python3-pytest-xdist,
         #python3-systemd,
         #python3-tz,
         python3-venv,              # ansible-inventory; ./test/lib/ansible_test/_util/target/injector/virtualenv.sh
         python3-virtualenv,        # ansible-inventory, ansible-test-installed; ./test/lib/ansible_test/_util/target/injector/virtualenv.sh
         #python3-winrm,
         python3-yaml,              # ansible-test-units-forked
         #pwsh,                      # ansible-test-sanity-validate-modules, see RFP bug https://bugs.debian.org/834756,
         #rsync,
         sudo,                      # needed for testbed-setup.sh
         tar,                       # integration test git
         unzip,                     # integration test git
         zip,                       # integration test git
Restrictions:
  allow-stderr,     # lots of STDERR output
  needs-internet,   # used for ansible-galaxy and pip tests
  needs-root,       # we're running tests requiring root
  # don't run broken tests on CI, as that makes autopkgtest time out
  # Run `autopkgtest --ignore-restrictions disabled-on-ci [...]` to run locally.
  # Thanks elbrus for the tip!
  disabled-on-ci,
