Skip to content

Commit

Permalink
testlib_refactor: create targets for unit- and system level test helpers
Browse files Browse the repository at this point in the history
Add Bazel target for unit tests - 'testlib_unit' and for system
level tests - 'testlib_system_level'. The idea is to restrict
usage of specific helpers depending on the test level.

Jira ticket: CMK-21344

Change-Id: Ief24afef783da9323ef594712b792369719734f7
  • Loading branch information
asyash26 committed Feb 13, 2025
1 parent 1681c43 commit 75dd2fe
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,39 @@ py_library(
requirement("pytest-metadata"),
],
)

py_library(
name = "testlib_system_level",
testonly = True,
srcs = ["__init__.py"] + glob(
include = ["testlib/**"],
exclude = ["testlib/unit/**"],
),
imports = [".."],
deps = [
"//cmk:lib_cmk",
requirement("beautifulsoup4"),
requirement("cryptography"),
requirement("docker"),
requirement("dockerpty"),
requirement("pexpect"),
requirement("playwright"),
requirement("pytest"),
requirement("requests"),
],
)

py_library(
name = "testlib_unit",
testonly = True,
srcs = ["__init__.py"] + glob(include = [
"testlib/unit/**",
"testlib/common/**",
]),
imports = [".."],
deps = [
"//cmk:lib_cmk",
requirement("pexpect"),
requirement("pytest"),
],
)

0 comments on commit 75dd2fe

Please sign in to comment.