forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD
More file actions
63 lines (60 loc) · 1.91 KB
/
Copy pathBUILD
File metadata and controls
63 lines (60 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
load("@aspect_rules_py//py:defs.bzl", "py_pytest_main", "py_test")
load("@cmk_requirements//:requirements.bzl", "requirement")
filegroup(
name = "bakery_test_files",
srcs = glob(["plugins/bakery/test_*.py"]),
visibility = ["//tests/unit/cmk/base/nonfree/pro:__pkg__"],
)
py_pytest_main(
name = "__test__",
deps = [
requirement("pytest"),
# pytest-xdist for `--numprocesses=NPROC`
requirement("pytest-xdist"),
],
)
py_test(
name = "base",
size = "small",
timeout = "moderate",
srcs = ["__test__.py"] + glob(["**/*.py"]),
args = [
"--config-file=$(location @//:pyproject.toml)",
"--import-mode=importlib",
"--random-order-bucket=global",
"--dist=loadfile",
"--numprocesses=4",
],
data = ["@//:pyproject.toml"],
env = {"EDITION": "community"},
main = ":__test__.py",
visibility = ["//visibility:private"],
deps = [
":__test__",
"//tests/unit:conftest",
"//tests/testlib/common:empty_config",
"//tests/testlib/common:utils",
"//tests/testlib/unit",
# -----------------------------------------
# TODO: some base tests rely on plugins
# being discoverable.
# As long as these tests are not cleaned
# up (== work with dedicated plugins)
# we need to add the required plugins here.
"//cmk/plugins",
"//cmk/legacy_checks",
"//packages/cmk-plugins:graylog",
"//packages/cmk-logwatch:plugins",
# -----------------------------------------
requirement("pytest-mock"),
requirement("pytest-asyncio"),
requirement("pytest-random-order"),
requirement("fakeredis"),
requirement("fastapi"),
requirement("httpx"),
requirement("starlette"),
requirement("time-machine"),
requirement("requests"),
requirement("watchdog"),
],
)