Make all tests runnable through hatch test

This commit is contained in:
Daniel Milnes 2026-04-26 16:13:40 +01:00
commit 3e5fac69f2
Signed by untrusted user: thebeanogamer
GPG key ID: 1701097BBDD44D1B
3 changed files with 24 additions and 1 deletions

View file

@ -16,7 +16,7 @@ dependencies = [
"fedfind",
"fedora-messaging",
"fedora-image-uploader-messages",
"mslisa[azure,aws]",
"mslisa[azure,aws] @ git+https://github.com/microsoft/lisa.git",
]
[project.optional-dependencies]
@ -33,6 +33,20 @@ path = "fedora_image_tester/__init__.py"
# Required for LISA since they don't publish releases to PyPI yet
allow-direct-references = true
[tool.hatch.envs.hatch-test]
features = ["test"]
extra-dependencies = [
"fedora-image-uploader-messages @ {root:uri}/../fedora-image-uploader-messages",
]
# mslisa pins pluggy<0.14 which conflicts with the pluggy>=1.4 required by
# modern pytest. Tell uv (hatch's resolver) to ignore mslisa's pluggy pin so
# the test environment can resolve.
[tool.uv]
override-dependencies = [
"pluggy>=1.4",
]
[tool.black]
line-length = 100

View file

@ -52,6 +52,9 @@ test = [
[tool.hatch.version]
path = "fedora_image_uploader_messages/__init__.py"
[tool.hatch.envs.hatch-test]
features = ["test"]
[tool.black]
line-length = 100

View file

@ -54,6 +54,12 @@ fedora-image-uploader = "fedora_image_uploader.cli:main"
[tool.hatch.version]
path = "fedora_image_uploader/__init__.py"
[tool.hatch.envs.hatch-test]
features = ["test", "aws", "azure", "gcp"]
extra-dependencies = [
"fedora-image-uploader-messages @ {root:uri}/../fedora-image-uploader-messages",
]
[tool.black]
line-length = 100