Skip to content

Commit

Permalink
bazel: add cloud storage clients library
Browse files Browse the repository at this point in the history
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
  • Loading branch information
dotnwat committed Jul 18, 2024
1 parent b436b46 commit 87cec72
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 0 deletions.
63 changes: 63 additions & 0 deletions src/v/cloud_storage_clients/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
load("//bazel:build.bzl", "redpanda_cc_library")

redpanda_cc_library(
name = "cloud_storage_clients",
srcs = [
"abs_client.cc",
"abs_error.cc",
"client_pool.cc",
"client_probe.cc",
"configuration.cc",
"s3_client.cc",
"s3_error.cc",
"util.cc",
"xml_sax_parser.cc",
],
hdrs = [
"abs_client.h",
"abs_error.h",
"client.h",
"client_pool.h",
"client_probe.h",
"configuration.h",
"logger.h",
"s3_client.h",
"s3_error.h",
"types.h",
"util.h",
"xml_sax_parser.h",
],
# for libxml2
exclude_layering_check = True,
include_prefix = "cloud_storage_clients",
visibility = ["//visibility:public"],
deps = [
"//src/v/base",
"//src/v/bytes",
"//src/v/bytes:iobuf",
"//src/v/bytes:iostream",
"//src/v/bytes:streambuf",
"//src/v/cloud_roles",
"//src/v/config",
"//src/v/container:intrusive",
"//src/v/hashing:secure",
"//src/v/http",
"//src/v/json",
"//src/v/metrics",
"//src/v/model",
"//src/v/net",
"//src/v/ssx:future_util",
"//src/v/ssx:sformat",
"//src/v/strings:string_switch",
"//src/v/utils:base64",
"//src/v/utils:functional",
"//src/v/utils:log_hist",
"//src/v/utils:named_type",
"//src/v/utils:stop_signal",
"@boost//:beast",
"@boost//:lexical_cast",
"@boost//:property_tree",
"@libxml2",
"@seastar",
],
)
110 changes: 110 additions & 0 deletions src/v/cloud_storage_clients/tests/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
load("//bazel:test.bzl", "redpanda_cc_btest", "redpanda_cc_gtest")

redpanda_cc_btest(
name = "backend_detection_test",
timeout = "short",
srcs = [
"backend_detection_test.cc",
],
deps = [
"//src/v/cloud_storage_clients",
"//src/v/config",
"//src/v/test_utils:seastar_boost",
"@boost//:test",
],
)

redpanda_cc_btest(
name = "client_pool_test",
timeout = "short",
srcs = [
"client_pool_test.cc",
],
deps = [
"//src/v/base",
"//src/v/cloud_storage_clients",
"//src/v/test_utils:seastar_boost",
"@boost//:test",
"@seastar",
"@seastar//:testing",
],
)

redpanda_cc_btest(
name = "s3_client_test",
timeout = "short",
srcs = [
"s3_client_test.cc",
],
deps = [
"//src/v/base",
"//src/v/bytes:iobuf",
"//src/v/bytes:iobuf_parser",
"//src/v/bytes:iostream",
"//src/v/cloud_storage_clients",
"//src/v/hashing:secure",
"//src/v/net",
"//src/v/test_utils:seastar_boost",
"//src/v/utils:base64",
"//src/v/utils:unresolved_address",
"@boost//:algorithm",
"@boost//:beast",
"@boost//:property_tree",
"@boost//:test",
"@seastar",
"@seastar//:testing",
],
)

redpanda_cc_btest(
name = "xml_sax_parser_test",
timeout = "short",
srcs = [
"xml_sax_parser_test.cc",
],
deps = [
"//src/v/cloud_storage_clients",
"//src/v/test_utils:seastar_boost",
"@boost//:test",
],
)

redpanda_cc_btest(
name = "exception_test",
timeout = "short",
srcs = [
"exception_test.cc",
],
deps = [
"//src/v/cloud_storage_clients",
"//src/v/test_utils:seastar_boost",
"@boost//:test",
"@seastar",
],
)

redpanda_cc_btest(
name = "util_test",
timeout = "short",
srcs = [
"util_test.cc",
],
deps = [
"//src/v/cloud_storage_clients",
"//src/v/test_utils:seastar_boost",
"@boost//:test",
],
)

redpanda_cc_gtest(
name = "types_test",
timeout = "short",
srcs = [
"types_test.cc",
],
deps = [
"//src/v/cloud_storage_clients",
"//src/v/config",
"//src/v/test_utils:gtest",
],
)

0 comments on commit 87cec72

Please sign in to comment.