-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copy pytest config file to tests/unit directory #160
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The way pytest discovers/collects tests is that if you specify `-c file` on the command line, it uses the directory of `file` as the root directory and starts looking for files from there, and it does not use any other directory, not `--rootdir`, and not any directories specified on the command line. https://docs.pytest.org/en/latest/reference/customize.html#initialization-determining-rootdir-and-configfile Which means pytest looks for test files in places where we do not want it to look - we only want it to look in the `tests/unit` directory. This causes problems with github actions because it will look in directories where it does not have permission to look, and will fail. The fix is to copy the pytest config file into the `tests/unit` directory and use `pytest -c tests/unit/$configfile ...`.
spetrosi
approved these changes
Feb 2, 2024
richm
added a commit
to linux-system-roles/certificate
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/bootloader
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/crypto_policies
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/ad_integration
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/cockpit
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/fapolicyd
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
This was referenced Feb 2, 2024
Merged
richm
added a commit
to linux-system-roles/journald
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/firewall
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/ha_cluster
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/kdump
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/kernel_settings
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
This was referenced Feb 2, 2024
Merged
richm
added a commit
to linux-system-roles/logging
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/keylime_server
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/metrics
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/mssql
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/template
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/timesync
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/systemd
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/ssh
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/storage
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/selinux
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/postgresql
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/postfix
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/pam_pwd
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/podman
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/nbde_client
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/nbde_server
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/keylime_server
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/mssql
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/metrics
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/logging
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/kernel_settings
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/journald
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/ha_cluster
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/firewall
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/kdump
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/fapolicyd
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/ad_integration
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/bootloader
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/certificate
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/cockpit
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/crypto_policies
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to richm/snapshot
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/snapshot
that referenced
this pull request
Feb 2, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
richm
added a commit
to linux-system-roles/network
that referenced
this pull request
Feb 6, 2024
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to 3.2.2, not just the python unit tests, even though the fix is only related to pytest. All roles are updated to use tox-lsr 3.2.2 for the sake of consistency even if not affected by the pytest issue. Something changed recently in the way github actions provisions systems which means some of the directories are not readable by the python unit test actions. In addition, the python unit tests were causing a lot of unnecessary directory traversal doing collection/discovery of unit test files, because of using `pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the directory of the config file is the root directory for the tests and tests discovery, and there is no way around this. Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the `tests/unit` directory, which makes that the test root directory. See also linux-system-roles/tox-lsr#160 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The way pytest discovers/collects tests is that if you specify
-c file
on the command line, it uses the directory of
file
as the rootdirectory and starts looking for files from there, and it does not
use any other directory, not
--rootdir
, and not any directoriesspecified on the command line.
https://docs.pytest.org/en/latest/reference/customize.html#initialization-determining-rootdir-and-configfile
Which means pytest looks for test files in places where we do not
want it to look - we only want it to look in the
tests/unit
directory.This causes problems with github actions because it will look in
directories where it does not have permission to look, and will fail.
The fix is to copy the pytest config file into the
tests/unit
directoryand use
pytest -c tests/unit/$configfile ...
.