107 lines
2.8 KiB
Python
107 lines
2.8 KiB
Python
load("@bazel-erlang//:ct.bzl", "ct_suite")
|
|
load("//:rabbitmq_home.bzl", "rabbitmq_home")
|
|
load("//:rabbitmq_run.bzl", "rabbitmq_run")
|
|
load("//:rabbitmq.bzl", "APP_VERSION", "RABBITMQ_TEST_ERLC_OPTS", "rabbitmq_lib")
|
|
|
|
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,
|
|
app_version = APP_VERSION,
|
|
extra_apps = EXTRA_APPS,
|
|
runtime_deps = RUNTIME_DEPS,
|
|
deps = DEPS,
|
|
)
|
|
|
|
rabbitmq_home(
|
|
name = "broker-for-tests-home",
|
|
plugins = [
|
|
"//deps/rabbit:bazel_erlang_lib",
|
|
":bazel_erlang_lib",
|
|
],
|
|
)
|
|
|
|
rabbitmq_run(
|
|
name = "rabbitmq-for-tests-run",
|
|
home = ":broker-for-tests-home",
|
|
)
|
|
|
|
ct_suite(
|
|
name = "auth_SUITE",
|
|
size = "small",
|
|
additional_srcs = [
|
|
"test/auth_http_mock.erl",
|
|
],
|
|
erlc_opts = RABBITMQ_TEST_ERLC_OPTS,
|
|
test_env = {
|
|
"RABBITMQ_CT_SKIP_AS_ERROR": "true",
|
|
},
|
|
runtime_deps = [
|
|
"@cowboy//:bazel_erlang_lib",
|
|
],
|
|
deps = [
|
|
"//deps/rabbit_common:bazel_erlang_lib",
|
|
],
|
|
)
|
|
|
|
ct_suite(
|
|
name = "config_schema_SUITE",
|
|
data = [
|
|
"@rabbitmq_ct_helpers//tools/tls-certs:Makefile",
|
|
"@rabbitmq_ct_helpers//tools/tls-certs:openssl.cnf.in",
|
|
],
|
|
erlc_opts = RABBITMQ_TEST_ERLC_OPTS,
|
|
test_env = {
|
|
"RABBITMQ_CT_SKIP_AS_ERROR": "true",
|
|
"RABBITMQ_RUN": "$TEST_SRCDIR/$TEST_WORKSPACE/deps/rabbitmq_auth_backend_http/rabbitmq-for-tests-run",
|
|
"RABBITMQCTL": "$TEST_SRCDIR/$TEST_WORKSPACE/deps/rabbitmq_auth_backend_http/broker-for-tests-home/sbin/rabbitmqctl",
|
|
"RABBITMQ_PLUGINS": "$TEST_SRCDIR/$TEST_WORKSPACE/deps/rabbitmq_auth_backend_http/broker-for-tests-home/sbin/rabbitmq-plugins",
|
|
},
|
|
tools = [
|
|
":rabbitmq-for-tests-run",
|
|
],
|
|
runtime_deps = [
|
|
"//deps/rabbitmq_cli:elixir_as_bazel_erlang_lib",
|
|
"//deps/rabbitmq_cli:rabbitmqctl",
|
|
"@rabbitmq_ct_client_helpers//:bazel_erlang_lib",
|
|
"@rabbitmq_ct_helpers//:bazel_erlang_lib",
|
|
],
|
|
)
|
|
|
|
ct_suite(
|
|
name = "unit_SUITE",
|
|
size = "small",
|
|
erlc_opts = RABBITMQ_TEST_ERLC_OPTS,
|
|
test_env = {
|
|
"RABBITMQ_CT_SKIP_AS_ERROR": "true",
|
|
},
|
|
)
|