File: BUILD.bazel

package info (click to toggle)
rabbitmq-server 3.10.8-1.1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 32,436 kB
  • sloc: erlang: 200,376; javascript: 18,664; makefile: 2,244; python: 1,934; sh: 1,845; xml: 648; cs: 368; java: 320; ruby: 212; php: 100; perl: 63; awk: 13
file content (130 lines) | stat: -rw-r--r-- 2,791 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
load("@rules_erlang//:xref2.bzl", "xref")
load("@rules_erlang//:dialyze.bzl", "dialyze", "plt")
load(
    "//:rabbitmq.bzl",
    "RABBITMQ_DIALYZER_OPTS",
    "assert_suites",
    "broker_for_integration_suites",
    "rabbitmq_app",
    "rabbitmq_integration_suite",
    "rabbitmq_suite",
    "rabbitmq_test_helper",
    "without",
)

APP_NAME = "rabbitmq_auth_backend_oauth2"

APP_DESCRIPTION = "OAuth 2 and JWT-based AuthN and AuthZ backend"

BUILD_DEPS = [
    "//deps/rabbit_common:erlang_app",
    "//deps/rabbitmq_cli:rabbitmqctl",
]

DEPS = [
    "@jose//:erlang_app",
]

RUNTIME_DEPS = [
    "//deps/rabbit:erlang_app",
    "@base64url//:erlang_app",
    "@cowlib//:erlang_app",
]

rabbitmq_app(
    app_description = APP_DESCRIPTION,
    app_name = APP_NAME,
    build_deps = BUILD_DEPS,
    runtime_deps = RUNTIME_DEPS,
    deps = DEPS,
)

xref(
    additional_libs = [
        "//deps/rabbitmq_cli:rabbitmqctl",
    ],
)

plt(
    name = "base_plt",
    deps = without(
        "//deps/rabbitmq_cli:rabbitmqctl",
        BUILD_DEPS + DEPS,
    ),
)

dialyze(
    dialyzer_opts = RABBITMQ_DIALYZER_OPTS + ["-Wno_undefined_callbacks"],
    plt = ":base_plt",
    warnings_as_errors = False,
)

broker_for_integration_suites()

rabbitmq_test_helper(
    name = "rabbit_auth_backend_oauth2_test_util",
    srcs = [
        "test/rabbit_auth_backend_oauth2_test_util.erl",
    ],
)

PACKAGE = "deps/rabbitmq_auth_backend_oauth2"

suites = [
    rabbitmq_integration_suite(
        PACKAGE,
        name = "add_uaa_key_command_SUITE",
        size = "small",
    ),
    rabbitmq_integration_suite(
        PACKAGE,
        name = "config_schema_SUITE",
    ),
    rabbitmq_integration_suite(
        PACKAGE,
        name = "jwks_SUITE",
        additional_beam = [
            ":rabbit_auth_backend_oauth2_test_util",
        ],
        additional_srcs = [
            "test/jwks_http_app.erl",
            "test/jwks_http_handler.erl",
            "test/jwks_http_sup.erl",
        ],
        runtime_deps = [
            "@cowboy//:erlang_app",
        ],
    ),
    rabbitmq_suite(
        name = "scope_SUITE",
        size = "medium",
        deps = [
            "//deps/rabbit_common:erlang_app",
        ],
    ),
    rabbitmq_integration_suite(
        PACKAGE,
        name = "system_SUITE",
        size = "medium",
        additional_beam = [
            ":rabbit_auth_backend_oauth2_test_util",
        ],
    ),
    rabbitmq_integration_suite(
        PACKAGE,
        name = "unit_SUITE",
        size = "medium",
        additional_beam = [
            ":rabbit_auth_backend_oauth2_test_util",
        ],
    ),
    rabbitmq_suite(
        name = "wildcard_match_SUITE",
        size = "small",
    ),
]

assert_suites(
    suites,
    glob(["test/**/*_SUITE.erl"]),
)