96 lines
1.9 KiB
Python
96 lines
1.9 KiB
Python
load("@bazel-erlang//:xref.bzl", "xref")
|
|
load("@bazel-erlang//:dialyze.bzl", "dialyze", "plt")
|
|
load(
|
|
"//:rabbitmq.bzl",
|
|
"RABBITMQ_DIALYZER_OPTS",
|
|
"assert_suites",
|
|
"broker_for_integration_suites",
|
|
"rabbitmq_integration_suite",
|
|
"rabbitmq_lib",
|
|
"rabbitmq_suite",
|
|
)
|
|
|
|
APP_ENV = """[
|
|
{http_method, get},
|
|
{user_path, "http://localhost:8000/auth/user"},
|
|
{vhost_path, "http://localhost:8000/auth/vhost"},
|
|
{resource_path, "http://localhost:8000/auth/resource"},
|
|
{topic_path, "http://localhost:8000/auth/topic"}
|
|
]"""
|
|
|
|
APP_NAME = "rabbitmq_auth_backend_http"
|
|
|
|
APP_DESCRIPTION = "RabbitMQ HTTP Authentication Backend"
|
|
|
|
APP_MODULE = "rabbit_auth_backend_http_app"
|
|
|
|
EXTRA_APPS = [
|
|
"inets",
|
|
]
|
|
|
|
DEPS = [
|
|
"//deps/rabbit_common:bazel_erlang_lib",
|
|
]
|
|
|
|
RUNTIME_DEPS = [
|
|
"//deps/rabbit:bazel_erlang_lib",
|
|
"//deps/amqp_client:bazel_erlang_lib",
|
|
]
|
|
|
|
rabbitmq_lib(
|
|
app_description = APP_DESCRIPTION,
|
|
app_env = APP_ENV,
|
|
app_module = APP_MODULE,
|
|
app_name = APP_NAME,
|
|
extra_apps = EXTRA_APPS,
|
|
runtime_deps = RUNTIME_DEPS,
|
|
deps = DEPS,
|
|
)
|
|
|
|
xref(tags = ["xref"])
|
|
|
|
plt(
|
|
name = "base_plt",
|
|
apps = EXTRA_APPS,
|
|
plt = "//:base_plt",
|
|
)
|
|
|
|
dialyze(
|
|
dialyzer_opts = RABBITMQ_DIALYZER_OPTS,
|
|
plt = ":base_plt",
|
|
tags = ["dialyze"],
|
|
)
|
|
|
|
broker_for_integration_suites()
|
|
|
|
PACKAGE = "deps/rabbitmq_auth_backend_http"
|
|
|
|
suites = [
|
|
rabbitmq_suite(
|
|
name = "auth_SUITE",
|
|
size = "small",
|
|
additional_srcs = [
|
|
"test/auth_http_mock.erl",
|
|
],
|
|
runtime_deps = [
|
|
"@cowboy//:bazel_erlang_lib",
|
|
],
|
|
deps = [
|
|
"//deps/rabbit_common:bazel_erlang_lib",
|
|
],
|
|
),
|
|
rabbitmq_integration_suite(
|
|
PACKAGE,
|
|
name = "config_schema_SUITE",
|
|
),
|
|
rabbitmq_suite(
|
|
name = "unit_SUITE",
|
|
size = "small",
|
|
),
|
|
]
|
|
|
|
assert_suites(
|
|
suites,
|
|
glob(["test/**/*_SUITE.erl"]),
|
|
)
|