rabbitmq-server/deps/rabbitmq_stomp/BUILD.bazel

166 lines
3.6 KiB
Python

load("@bazel-erlang//:bazel_erlang_lib.bzl", "erlc")
load("@bazel-erlang//:xref.bzl", "xref")
load("@bazel-erlang//:dialyze.bzl", "dialyze")
load(
"//:rabbitmq.bzl",
"RABBITMQ_DIALYZER_OPTS",
"RABBITMQ_TEST_ERLC_OPTS",
"assert_suites",
"broker_for_integration_suites",
"rabbitmq_integration_suite",
"rabbitmq_lib",
"rabbitmq_suite",
)
APP_NAME = "rabbitmq_stomp"
APP_DESCRIPTION = "RabbitMQ STOMP plugin"
APP_MODULE = "rabbit_stomp"
APP_ENV = """[
{default_user,
[{login, <<"guest">>},
{passcode, <<"guest">>}]},
{default_vhost, <<"/">>},
{default_topic_exchange, <<"amq.topic">>},
{default_nack_requeue, true},
{ssl_cert_login, false},
{implicit_connect, false},
{tcp_listeners, [61613]},
{ssl_listeners, []},
{num_tcp_acceptors, 10},
{num_ssl_acceptors, 10},
{tcp_listen_options, [{backlog, 128},
{nodelay, true}]},
%% see rabbitmq/rabbitmq-stomp#39
{trailing_lf, true},
%% see rabbitmq/rabbitmq-stomp#57
{hide_server_info, false},
{proxy_protocol, false}
]"""
BUILD_DEPS = [
"//deps/rabbitmq_cli:rabbitmqctl",
]
DEPS = [
"//deps/amqp_client:bazel_erlang_lib",
"//deps/rabbit_common:bazel_erlang_lib",
"@ranch//:bazel_erlang_lib",
]
RUNTIME_DEPS = [
"//deps/rabbit:bazel_erlang_lib",
]
rabbitmq_lib(
app_description = APP_DESCRIPTION,
app_env = APP_ENV,
app_module = APP_MODULE,
app_name = APP_NAME,
build_deps = BUILD_DEPS,
runtime_deps = RUNTIME_DEPS,
deps = DEPS,
)
xref(tags = ["xref"])
dialyze(
dialyzer_opts = RABBITMQ_DIALYZER_OPTS,
plt = "//:base_plt",
tags = ["dialyze"],
)
broker_for_integration_suites()
PACKAGE = "deps/rabbitmq_stomp"
erlc(
name = "rabbit_stomp_client",
testonly = True,
srcs = [
"test/src/rabbit_stomp_client.erl",
],
hdrs = glob([
"include/**/*.hrl",
"src/**/*.hrl",
]),
erlc_opts = RABBITMQ_TEST_ERLC_OPTS,
deps = [
":test_bazel_erlang_lib",
],
)
suites = [
rabbitmq_integration_suite(
PACKAGE,
name = "command_SUITE",
size = "medium",
additional_beam = [
":rabbit_stomp_client",
],
),
rabbitmq_integration_suite(
PACKAGE,
name = "config_schema_SUITE",
size = "medium",
),
rabbitmq_integration_suite(
PACKAGE,
name = "connections_SUITE",
size = "medium",
additional_beam = [
":rabbit_stomp_client",
],
),
rabbitmq_suite(
name = "frame_SUITE",
size = "small",
deps = [
"//deps/amqp_client:bazel_erlang_lib",
"//deps/rabbit_common:bazel_erlang_lib",
],
),
rabbitmq_integration_suite(
PACKAGE,
name = "proxy_protocol_SUITE",
size = "medium",
),
rabbitmq_integration_suite(
PACKAGE,
name = "python_SUITE",
flaky = True,
shard_count = 3,
),
rabbitmq_integration_suite(
PACKAGE,
name = "system_SUITE",
size = "medium",
additional_beam = [
":rabbit_stomp_client",
],
),
rabbitmq_integration_suite(
PACKAGE,
name = "topic_SUITE",
size = "medium",
additional_beam = [
":rabbit_stomp_client",
],
),
rabbitmq_suite(
name = "util_SUITE",
size = "medium",
deps = [
"//deps/amqp_client:bazel_erlang_lib",
"//deps/rabbit_common:bazel_erlang_lib",
],
),
]
assert_suites(
suites,
glob(["test/**/*_SUITE.erl"]),
)