mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-01 18:52:21 +01:00
tests: skip the searxng settings migration tests on Windows (#6882)
scripts/migrate_searxng_settings.py runs inside the searxng container entrypoint and preserves the settings file's owner and mode with os.fchmod/os.fchown, which do not exist on Windows, so every subprocess run of the script in this module fails with AttributeError before the behaviour under test is reached. Mark the module POSIX-only. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Alexandre Teixeira <general@alexandreteixeira.dev>
This commit is contained in:
co-authored by
Claude Fable 5.1
Alexandre Teixeira
parent
6fced41220
commit
c4fdd7ad5b
@@ -8,6 +8,13 @@ from pathlib import Path
|
|||||||
import pytest
|
import pytest
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
# The migration runs inside the searxng container entrypoint and preserves the
|
||||||
|
# settings file's owner/mode with os.fchmod/os.fchown, which do not exist on
|
||||||
|
# Windows, so every subprocess run of the script fails there before it starts.
|
||||||
|
pytestmark = pytest.mark.skipif(
|
||||||
|
os.name == "nt", reason="POSIX-only: migrate_searxng_settings.py uses os.fchmod/os.fchown"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
ROOT = Path(__file__).resolve().parent.parent
|
ROOT = Path(__file__).resolve().parent.parent
|
||||||
MIGRATION = ROOT / "scripts" / "migrate_searxng_settings.py"
|
MIGRATION = ROOT / "scripts" / "migrate_searxng_settings.py"
|
||||||
|
|||||||
Reference in New Issue
Block a user