From 5b515d3860160a45ad1db429fc33667b2d052eba Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 15:32:20 +0000 Subject: [PATCH 01/15] pandaproxy: bazelize json/requests/test/fetch test --- src/v/kafka/client/test/BUILD | 1 + src/v/pandaproxy/json/requests/test/BUILD | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/v/pandaproxy/json/requests/test/BUILD diff --git a/src/v/kafka/client/test/BUILD b/src/v/kafka/client/test/BUILD index 0a9797c4ccc5..c7ef249a04b4 100644 --- a/src/v/kafka/client/test/BUILD +++ b/src/v/kafka/client/test/BUILD @@ -24,6 +24,7 @@ redpanda_test_cc_library( "//src/v/random:generators", ], include_prefix = "kafka/client/test", + visibility = ["//visibility:public"], deps = [ "//src/v/reflection:adl", "//src/v/storage:record_batch_builder", diff --git a/src/v/pandaproxy/json/requests/test/BUILD b/src/v/pandaproxy/json/requests/test/BUILD new file mode 100644 index 000000000000..d3d38d07af63 --- /dev/null +++ b/src/v/pandaproxy/json/requests/test/BUILD @@ -0,0 +1,22 @@ +load("//bazel:test.bzl", "redpanda_cc_btest") + +redpanda_cc_btest( + name = "fetch", + timeout = "short", + srcs = [ + "fetch.cc", + ], + deps = [ + "//src/v/base", + "//src/v/container:fragmented_vector", + "//src/v/json", + "//src/v/kafka/client/test:utils", + "//src/v/kafka/protocol", + "//src/v/model", + "//src/v/pandaproxy", + "//src/v/test_utils:seastar_boost", + "@boost//:test", + "@seastar", + "@seastar//:testing", + ], +) From f16fb6be15c59ed86424c8bb87903de5e8836752 Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 15:38:51 +0000 Subject: [PATCH 02/15] pandaproxy: bazelize json/requests/test/produce test --- src/v/pandaproxy/json/requests/test/BUILD | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/v/pandaproxy/json/requests/test/BUILD b/src/v/pandaproxy/json/requests/test/BUILD index d3d38d07af63..af2aa0a3f709 100644 --- a/src/v/pandaproxy/json/requests/test/BUILD +++ b/src/v/pandaproxy/json/requests/test/BUILD @@ -20,3 +20,22 @@ redpanda_cc_btest( "@seastar//:testing", ], ) + +redpanda_cc_btest( + name = "produce", + timeout = "short", + srcs = [ + "produce.cc", + ], + deps = [ + "//src/v/base", + "//src/v/kafka/protocol:produce", + "//src/v/kafka/protocol/schemata:produce_response", + "//src/v/model", + "//src/v/pandaproxy", + "//src/v/test_utils:seastar_boost", + "//src/v/utils:to_string", + "@seastar", + "@seastar//:testing", + ], +) From 57ef5040177918b9ffd6be0f6e3edd208efa6b44 Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 15:45:26 +0000 Subject: [PATCH 03/15] pandaproxy: bazelize json/test/iobuf test --- src/v/pandaproxy/json/test/BUILD | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/v/pandaproxy/json/test/BUILD diff --git a/src/v/pandaproxy/json/test/BUILD b/src/v/pandaproxy/json/test/BUILD new file mode 100644 index 000000000000..e967ee8ffe32 --- /dev/null +++ b/src/v/pandaproxy/json/test/BUILD @@ -0,0 +1,17 @@ +load("//bazel:test.bzl", "redpanda_cc_btest") + +redpanda_cc_btest( + name = "iobuf", + timeout = "short", + srcs = [ + "iobuf.cc", + ], + deps = [ + "//src/v/bytes:iobuf_parser", + "//src/v/json", + "//src/v/pandaproxy", + "//src/v/test_utils:seastar_boost", + "@seastar", + "@seastar//:testing", + ], +) From 7e4e84cb74fd18350a953a2c56db7124804211e1 Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 15:52:02 +0000 Subject: [PATCH 04/15] pandaproxy: bazelize parsing/test/from_chars test --- src/v/pandaproxy/parsing/test/BUILD | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/v/pandaproxy/parsing/test/BUILD diff --git a/src/v/pandaproxy/parsing/test/BUILD b/src/v/pandaproxy/parsing/test/BUILD new file mode 100644 index 000000000000..2f0963e657c3 --- /dev/null +++ b/src/v/pandaproxy/parsing/test/BUILD @@ -0,0 +1,18 @@ +load("//bazel:test.bzl", "redpanda_cc_btest") + +redpanda_cc_btest( + name = "from_chars", + timeout = "short", + srcs = [ + "from_chars.cc", + ], + deps = [ + "//src/v/pandaproxy", + "//src/v/test_utils:seastar_boost", + "//src/v/utils:named_type", + "@boost//:mpl", + "@boost//:test", + "@seastar", + "@seastar//:testing", + ], +) From 56d258146f3d2180b3d5072f7b250b0b1dcde7dc Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 15:53:55 +0000 Subject: [PATCH 05/15] pandaproxy: bazelize parsing/test/httpd test --- src/v/pandaproxy/parsing/test/BUILD | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/v/pandaproxy/parsing/test/BUILD b/src/v/pandaproxy/parsing/test/BUILD index 2f0963e657c3..4ce8458808c8 100644 --- a/src/v/pandaproxy/parsing/test/BUILD +++ b/src/v/pandaproxy/parsing/test/BUILD @@ -16,3 +16,20 @@ redpanda_cc_btest( "@seastar//:testing", ], ) + +redpanda_cc_btest( + name = "httpd", + timeout = "short", + srcs = [ + "httpd.cc", + ], + deps = [ + "//src/v/pandaproxy", + "//src/v/test_utils:seastar_boost", + "@boost//:test", + "@boost//:tuple", + "@boost//:utility", + "@seastar", + "@seastar//:testing", + ], +) From 82f40f45315a20bee1cb69214465e6e31fba6a0a Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 17:03:15 +0000 Subject: [PATCH 06/15] pandaproxy: bazelize rest/test/consumer_group test --- src/v/pandaproxy/rest/test/BUILD | 23 ++++++++++++++++++++++ src/v/pandaproxy/test/BUILD | 16 +++++++++++++++ src/v/pandaproxy/test/pandaproxy_fixture.h | 5 ----- 3 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 src/v/pandaproxy/rest/test/BUILD diff --git a/src/v/pandaproxy/rest/test/BUILD b/src/v/pandaproxy/rest/test/BUILD new file mode 100644 index 000000000000..96ae5cf92bb5 --- /dev/null +++ b/src/v/pandaproxy/rest/test/BUILD @@ -0,0 +1,23 @@ +load("//bazel:test.bzl", "redpanda_cc_btest") + +redpanda_cc_btest( + name = "consumer_group", + timeout = "short", + srcs = [ + "consumer_group.cc", + ], + tags = ["exclusive"], + deps = [ + "//src/v/http", + "//src/v/kafka/protocol:join_group", + "//src/v/pandaproxy", + "//src/v/pandaproxy/test:fixture", + "//src/v/pandaproxy/test:utils", + "//src/v/test_utils:seastar_boost", + "//src/v/utils:unresolved_address", + "@boost//:beast", + "@boost//:test", + "@seastar", + "@seastar//:testing", + ], +) diff --git a/src/v/pandaproxy/test/BUILD b/src/v/pandaproxy/test/BUILD index 3fe96e84b65a..dae11606383a 100644 --- a/src/v/pandaproxy/test/BUILD +++ b/src/v/pandaproxy/test/BUILD @@ -14,6 +14,22 @@ redpanda_test_cc_library( ], ) +redpanda_test_cc_library( + name = "fixture", + hdrs = [ + "pandaproxy_fixture.h", + ], + implementation_deps = [ + ], + include_prefix = "pandaproxy/test", + visibility = ["//visibility:public"], + deps = [ + "//src/v/http", + "//src/v/pandaproxy", + "//src/v/redpanda/tests:fixture_btest", + ], +) + redpanda_cc_btest( name = "errors_test", timeout = "short", diff --git a/src/v/pandaproxy/test/pandaproxy_fixture.h b/src/v/pandaproxy/test/pandaproxy_fixture.h index 904f33dc5069..c4fb0f7e1286 100644 --- a/src/v/pandaproxy/test/pandaproxy_fixture.h +++ b/src/v/pandaproxy/test/pandaproxy_fixture.h @@ -11,12 +11,7 @@ #pragma once -#include "config/configuration.h" #include "http/client.h" -#include "kafka/client/client.h" -#include "kafka/client/configuration.h" -#include "kafka/protocol/metadata.h" -#include "pandaproxy/rest/configuration.h" #include "redpanda/tests/fixture.h" class pandaproxy_test_fixture : public redpanda_thread_fixture { From be5aca7bc142459afa95f5f2c4672af44682357c Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 17:06:33 +0000 Subject: [PATCH 07/15] pandaproxy: bazelize rest/test/fetch test --- src/v/pandaproxy/rest/test/BUILD | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/v/pandaproxy/rest/test/BUILD b/src/v/pandaproxy/rest/test/BUILD index 96ae5cf92bb5..0f3eb8e17e9c 100644 --- a/src/v/pandaproxy/rest/test/BUILD +++ b/src/v/pandaproxy/rest/test/BUILD @@ -21,3 +21,23 @@ redpanda_cc_btest( "@seastar//:testing", ], ) + +redpanda_cc_btest( + name = "fetch", + timeout = "short", + srcs = [ + "fetch.cc", + ], + tags = ["exclusive"], + deps = [ + "//src/v/http", + "//src/v/pandaproxy", + "//src/v/pandaproxy/test:fixture", + "//src/v/pandaproxy/test:utils", + "//src/v/test_utils:seastar_boost", + "@boost//:beast", + "@boost//:test", + "@seastar", + "@seastar//:testing", + ], +) From 8ef4e31150f32494a63d50448900e987daa0bb5f Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 17:08:11 +0000 Subject: [PATCH 08/15] pandaproxy: bazelize rest/test/list_topics test --- src/v/pandaproxy/rest/test/BUILD | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/v/pandaproxy/rest/test/BUILD b/src/v/pandaproxy/rest/test/BUILD index 0f3eb8e17e9c..1554c208c944 100644 --- a/src/v/pandaproxy/rest/test/BUILD +++ b/src/v/pandaproxy/rest/test/BUILD @@ -41,3 +41,22 @@ redpanda_cc_btest( "@seastar//:testing", ], ) + +redpanda_cc_btest( + name = "list_topics", + timeout = "short", + srcs = [ + "list_topics.cc", + ], + tags = ["exclusive"], + deps = [ + "//src/v/http", + "//src/v/pandaproxy/test:fixture", + "//src/v/pandaproxy/test:utils", + "//src/v/test_utils:seastar_boost", + "@boost//:beast", + "@boost//:test", + "@seastar", + "@seastar//:testing", + ], +) From 0c63b53e7429c57edf2f9dec5983d170e1261961 Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 17:11:10 +0000 Subject: [PATCH 09/15] pandaproxy: bazelize rest/test/produce test --- src/v/pandaproxy/rest/test/BUILD | 19 +++++++++++++++++++ src/v/pandaproxy/rest/test/produce.cc | 1 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/v/pandaproxy/rest/test/BUILD b/src/v/pandaproxy/rest/test/BUILD index 1554c208c944..c0aef904701a 100644 --- a/src/v/pandaproxy/rest/test/BUILD +++ b/src/v/pandaproxy/rest/test/BUILD @@ -60,3 +60,22 @@ redpanda_cc_btest( "@seastar//:testing", ], ) + +redpanda_cc_btest( + name = "produce", + timeout = "short", + srcs = [ + "produce.cc", + ], + tags = ["exclusive"], + deps = [ + "//src/v/http", + "//src/v/pandaproxy/test:fixture", + "//src/v/pandaproxy/test:utils", + "//src/v/test_utils:seastar_boost", + "@boost//:beast", + "@boost//:test", + "@seastar", + "@seastar//:testing", + ], +) diff --git a/src/v/pandaproxy/rest/test/produce.cc b/src/v/pandaproxy/rest/test/produce.cc index 0e2c431f2482..2088b881bd7a 100644 --- a/src/v/pandaproxy/rest/test/produce.cc +++ b/src/v/pandaproxy/rest/test/produce.cc @@ -8,7 +8,6 @@ // by the Apache License, Version 2.0 #include "http/client.h" -#include "pandaproxy/rest/configuration.h" #include "pandaproxy/test/pandaproxy_fixture.h" #include "pandaproxy/test/utils.h" From efdfbae42660d45ba10e63dfd95dd149d4d20b42 Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 17:15:57 +0000 Subject: [PATCH 10/15] pandaproxy: bazelize sr/requests/test/get_subject_versions_version --- .../schema_registry/requests/test/BUILD | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/v/pandaproxy/schema_registry/requests/test/BUILD diff --git a/src/v/pandaproxy/schema_registry/requests/test/BUILD b/src/v/pandaproxy/schema_registry/requests/test/BUILD new file mode 100644 index 000000000000..44a83922ef1d --- /dev/null +++ b/src/v/pandaproxy/schema_registry/requests/test/BUILD @@ -0,0 +1,16 @@ +load("//bazel:test.bzl", "redpanda_cc_btest") + +redpanda_cc_btest( + name = "get_subject_versions_version", + timeout = "short", + srcs = [ + "get_subject_versions_version.cc", + ], + deps = [ + "//src/v/base", + "//src/v/pandaproxy", + "//src/v/test_utils:seastar_boost", + "@seastar", + "@seastar//:testing", + ], +) From eac95ccae6fd6a114ddde898db806453be3f9b9e Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 17:17:48 +0000 Subject: [PATCH 11/15] pandaproxy: bazelize sr/requests/test/post_subject_versions --- .../schema_registry/requests/test/BUILD | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/v/pandaproxy/schema_registry/requests/test/BUILD b/src/v/pandaproxy/schema_registry/requests/test/BUILD index 44a83922ef1d..3917262c592a 100644 --- a/src/v/pandaproxy/schema_registry/requests/test/BUILD +++ b/src/v/pandaproxy/schema_registry/requests/test/BUILD @@ -14,3 +14,19 @@ redpanda_cc_btest( "@seastar//:testing", ], ) + +redpanda_cc_btest( + name = "post_subject_versions", + timeout = "short", + srcs = [ + "post_subject_versions.cc", + ], + deps = [ + "//src/v/base", + "//src/v/pandaproxy", + "//src/v/test_utils:seastar_boost", + "@fmt", + "@seastar", + "@seastar//:testing", + ], +) From 8a4f49539d2246915708d9ecc92ae173ad5ad0f9 Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 17:35:30 +0000 Subject: [PATCH 12/15] pandaproxy: bazelize sr/test/get_schema_types test --- src/v/pandaproxy/schema_registry/test/BUILD | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/v/pandaproxy/schema_registry/test/BUILD b/src/v/pandaproxy/schema_registry/test/BUILD index 9e492ab340d0..3c386a1a629e 100644 --- a/src/v/pandaproxy/schema_registry/test/BUILD +++ b/src/v/pandaproxy/schema_registry/test/BUILD @@ -227,3 +227,22 @@ redpanda_cc_btest( "@seastar//:testing", ], ) + +redpanda_cc_btest( + name = "get_schema_types", + timeout = "short", + srcs = [ + "get_schema_types.cc", + ], + tags = ["exclusive"], + deps = [ + "//src/v/http", + "//src/v/pandaproxy/test:fixture", + "//src/v/pandaproxy/test:utils", + "//src/v/test_utils:seastar_boost", + "@boost//:beast", + "@boost//:test", + "@seastar", + "@seastar//:testing", + ], +) From 57184137c8478ec28fbce1daaead60c6d9632e54 Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 17:44:05 +0000 Subject: [PATCH 13/15] pandaproxy: bazelize sr/test/post_subjects_subject_version test --- src/v/pandaproxy/schema_registry/test/BUILD | 46 +++++++++++++++++++ .../schema_registry/test/avro_payloads.h | 3 -- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/src/v/pandaproxy/schema_registry/test/BUILD b/src/v/pandaproxy/schema_registry/test/BUILD index 3c386a1a629e..29bdf8eebecc 100644 --- a/src/v/pandaproxy/schema_registry/test/BUILD +++ b/src/v/pandaproxy/schema_registry/test/BUILD @@ -1,5 +1,32 @@ load("//bazel:test.bzl", "redpanda_cc_btest", "redpanda_test_cc_library") +redpanda_test_cc_library( + name = "avro_payloads", + hdrs = [ + "avro_payloads.h", + ], + include_prefix = "pandaproxy/schema_registry/test", + deps = [ + "//src/v/pandaproxy", + ], +) + +redpanda_test_cc_library( + name = "client_utils", + hdrs = [ + "client_utils.h", + ], + include_prefix = "pandaproxy/schema_registry/test", + deps = [ + "//src/v/http", + "//src/v/json", + "//src/v/pandaproxy", + "//src/v/pandaproxy/test:utils", + "@abseil-cpp//absl/algorithm:container", + "@boost//:beast", + ], +) + redpanda_test_cc_library( name = "compatibility_avro", hdrs = [ @@ -246,3 +273,22 @@ redpanda_cc_btest( "@seastar//:testing", ], ) + +redpanda_cc_btest( + name = "post_subjects_subject_version", + timeout = "short", + srcs = [ + "post_subjects_subject_version.cc", + ], + tags = ["exclusive"], + deps = [ + ":avro_payloads", + ":client_utils", + "//src/v/pandaproxy", + "//src/v/pandaproxy/test:fixture", + "//src/v/pandaproxy/test:utils", + "//src/v/test_utils:seastar_boost", + "@seastar", + "@seastar//:testing", + ], +) diff --git a/src/v/pandaproxy/schema_registry/test/avro_payloads.h b/src/v/pandaproxy/schema_registry/test/avro_payloads.h index 556af0089042..b25c10b68317 100644 --- a/src/v/pandaproxy/schema_registry/test/avro_payloads.h +++ b/src/v/pandaproxy/schema_registry/test/avro_payloads.h @@ -11,9 +11,6 @@ #include "pandaproxy/schema_registry/avro.h" -namespace pp = pandaproxy; -namespace pps = pp::schema_registry; - const ss::sstring avro_string_payload{ R"( { From 3bc01f5d168b6b6c294af5d34190e9ea68a89387 Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 17:46:12 +0000 Subject: [PATCH 14/15] pandaproxy: bazelize sr/test/delete_subject_endpoints --- src/v/pandaproxy/schema_registry/test/BUILD | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/v/pandaproxy/schema_registry/test/BUILD b/src/v/pandaproxy/schema_registry/test/BUILD index 29bdf8eebecc..5084a96d4df2 100644 --- a/src/v/pandaproxy/schema_registry/test/BUILD +++ b/src/v/pandaproxy/schema_registry/test/BUILD @@ -292,3 +292,24 @@ redpanda_cc_btest( "@seastar//:testing", ], ) + +redpanda_cc_btest( + name = "delete_subject_endpoints", + timeout = "short", + srcs = [ + "delete_subject_endpoints.cc", + ], + tags = ["exclusive"], + deps = [ + ":avro_payloads", + ":client_utils", + "//src/v/pandaproxy", + "//src/v/pandaproxy/test:fixture", + "//src/v/pandaproxy/test:utils", + "//src/v/test_utils:seastar_boost", + "@boost//:beast", + "@boost//:test", + "@seastar", + "@seastar//:testing", + ], +) From 8b8fef2e6467782288d1e2fcaf72f9091e1de1c8 Mon Sep 17 00:00:00 2001 From: Ioannis Kavvadias Date: Tue, 17 Dec 2024 17:48:35 +0000 Subject: [PATCH 15/15] pandaproxy: add missing single-cpu argument to sr tests --- src/v/pandaproxy/schema_registry/test/BUILD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/v/pandaproxy/schema_registry/test/BUILD b/src/v/pandaproxy/schema_registry/test/BUILD index 5084a96d4df2..74c153da063c 100644 --- a/src/v/pandaproxy/schema_registry/test/BUILD +++ b/src/v/pandaproxy/schema_registry/test/BUILD @@ -159,6 +159,7 @@ redpanda_cc_btest( srcs = [ "sharded_store.cc", ], + cpu = 1, deps = [ "//src/v/pandaproxy", "//src/v/pandaproxy/schema_registry/test:compatibility_protobuf", @@ -175,6 +176,7 @@ redpanda_cc_btest( srcs = [ "consume_to_store.cc", ], + cpu = 1, deps = [ "//src/v/model", "//src/v/pandaproxy", @@ -191,6 +193,7 @@ redpanda_cc_btest( srcs = [ "compatibility_store.cc", ], + cpu = 1, deps = [ "//src/v/pandaproxy", "//src/v/pandaproxy/schema_registry/test:compatibility_avro", @@ -207,6 +210,7 @@ redpanda_cc_btest( srcs = [ "compatibility_3rdparty.cc", ], + cpu = 1, deps = [ "//src/v/model", "//src/v/pandaproxy", @@ -223,6 +227,7 @@ redpanda_cc_btest( srcs = [ "compatibility_avro.cc", ], + cpu = 1, deps = [ "//src/v/pandaproxy", "//src/v/pandaproxy/schema_registry/test:compatibility_avro", @@ -242,6 +247,7 @@ redpanda_cc_btest( srcs = [ "test_json_schema.cc", ], + cpu = 1, deps = [ "//src/v/pandaproxy", "//src/v/pandaproxy/schema_registry/test:compatibility_common",