mirror of
https://github.com/warp-tech/warpgate.git
synced 2025-09-13 01:55:52 +08:00
test fixes
This commit is contained in:
parent
e91a4cf5d5
commit
e13e04ac49
4 changed files with 24 additions and 10 deletions
16
tests/poetry.lock
generated
16
tests/poetry.lock
generated
|
@ -1333,6 +1333,20 @@ pytest = ">=8.2,<9"
|
||||||
docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"]
|
docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"]
|
||||||
testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"]
|
testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pytest-timeout"
|
||||||
|
version = "2.4.0"
|
||||||
|
description = "pytest plugin to abort hanging tests"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "pytest_timeout-2.4.0-py3-none-any.whl", hash = "sha256:c42667e5cdadb151aeb5b26d114aff6bdf5a907f176a007a30b940d3d865b5c2"},
|
||||||
|
{file = "pytest_timeout-2.4.0.tar.gz", hash = "sha256:7e68e90b01f9eff71332b25001f85c75495fc4e3a836701876183c4bcfd0540a"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
pytest = ">=7.0.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "python-dateutil"
|
name = "python-dateutil"
|
||||||
version = "2.9.0.post0"
|
version = "2.9.0.post0"
|
||||||
|
@ -1661,4 +1675,4 @@ propcache = ">=0.2.1"
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = "^3.10"
|
python-versions = "^3.10"
|
||||||
content-hash = "5a9322c03fb5093281d6bf03b632574c688e041e08a16eaa5ee04885758a274a"
|
content-hash = "87409e6b5f02be43f66a00ee328b70f4a89d601c5dbcfd513efc4aa89accc229"
|
||||||
|
|
|
@ -24,6 +24,7 @@ black = "^24"
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
pytest-asyncio = "^0.26.0"
|
pytest-asyncio = "^0.26.0"
|
||||||
|
pytest-timeout = "^2.4.0"
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
minversion = "6.0"
|
minversion = "6.0"
|
||||||
|
|
|
@ -5,5 +5,5 @@ rm target/llvm-cov-target/* || true
|
||||||
cargo llvm-cov clean --workspace
|
cargo llvm-cov clean --workspace
|
||||||
cargo llvm-cov --no-cfg-coverage-nightly --no-report --workspace --all-features -- --skip agent
|
cargo llvm-cov --no-cfg-coverage-nightly --no-report --workspace --all-features -- --skip agent
|
||||||
cd tests
|
cd tests
|
||||||
RUST_BACKTRACE=1 ENABLE_COVERAGE=1 poetry run pytest $@
|
RUST_BACKTRACE=1 ENABLE_COVERAGE=1 poetry run pytest --timeout 60 $@
|
||||||
cargo llvm-cov report --html
|
cargo llvm-cov report --html
|
||||||
|
|
|
@ -33,7 +33,6 @@ class Test:
|
||||||
sdk.RoleDataRequest(name=f"role-{uuid4()}"),
|
sdk.RoleDataRequest(name=f"role-{uuid4()}"),
|
||||||
)
|
)
|
||||||
user = api.create_user(sdk.CreateUserRequest(username=f"user-{uuid4()}"))
|
user = api.create_user(sdk.CreateUserRequest(username=f"user-{uuid4()}"))
|
||||||
if include_public_key:
|
|
||||||
api.create_public_key_credential(
|
api.create_public_key_credential(
|
||||||
user.id,
|
user.id,
|
||||||
sdk.NewPublicKeyCredential(
|
sdk.NewPublicKeyCredential(
|
||||||
|
|
Loading…
Add table
Reference in a new issue