Skip to content

Commit

Permalink
Fix worker tests in mc_manager
Browse files Browse the repository at this point in the history
  • Loading branch information
shaldengeki committed Jul 23, 2024
1 parent 5529503 commit 78ce3fb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
14 changes: 8 additions & 6 deletions mc_manager/worker/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@py_deps//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_binary")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
load("//tools/build_rules:cross_platform_image.bzl", "cross_platform_image")
load("//tools/build_rules:py_layer.bzl", "py_oci_image")

Expand All @@ -19,13 +19,15 @@ py_library(

py_binary(
name = "binary",
srcs = [
"__init__.py",
"worker.py",
],
srcs = ["worker.py"],
imports = [".."],
main = "worker.py",
deps = DEPS,
visibility = ["//:__subpackages__"],
deps = [
"@py_deps//boto3",
"@py_deps//docker",
"@py_deps//requests",
],
)

py_oci_image(
Expand Down
18 changes: 5 additions & 13 deletions mc_manager/worker/tests/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
load("@py_deps//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_test")

_RUNTIME_DEPS = [
requirement("boto3"),
requirement("docker"),
requirement("requests"),
]

py_test(
name = "default_tests",
name = "worker_test",
srcs = ["worker_test.py"],
main = "worker_test.py",
deps = [
requirement("pytest"),
requirement("pysocks"),
"//mc_manager/worker:library",
] + _RUNTIME_DEPS,
"//mc_manager/worker:binary",
"@py_deps//pytest",
"@py_deps//requests",
],
)

0 comments on commit 78ce3fb

Please sign in to comment.