Skip to content

Commit 1f4e3bb

Browse files
Merge pull request #14595 from amazon-mq/lukebakken/rabbitmq-aws-schema-tests
AWS plugin: enable Cuttlefish schema tests
2 parents 4a32470 + 1001e2b commit 1f4e3bb

File tree

3 files changed

+75
-5
lines changed

3 files changed

+75
-5
lines changed

deps/rabbitmq_aws/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
PROJECT = rabbitmq_aws
2-
PROJECT_DESCRIPTION = A minimalistic AWS API interface used by rabbitmq-autocluster (3.6.x) and other RabbitMQ plugins
3-
PROJECT_REGISTERED = rabbitmq_aws
2+
PROJECT_DESCRIPTION = AWS API library used by rabbitmq_peer_discovery_aws
3+
PROJECT_MOD = rabbitmq_aws
4+
PROJECT_REGISTERED = rabbitmq_aws_sup
45

56
define PROJECT_ENV
67
[]
78
endef
89

910
LOCAL_DEPS = crypto inets ssl xmerl public_key
1011
BUILD_DEPS = rabbit_common
11-
# We do not depend on rabbit therefore can't run the broker.
12-
DEP_PLUGINS = rabbit_common/mk/rabbitmq-build.mk
13-
TEST_DEPS = meck
12+
TEST_DEPS = meck rabbit rabbitmq_ct_helpers rabbitmq_ct_client_helpers
13+
14+
DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-plugin.mk
15+
DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk
1416

1517
include ../../rabbitmq-components.mk
1618
include ../../erlang.mk
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
%% This Source Code Form is subject to the terms of the Mozilla Public
2+
%% License, v. 2.0. If a copy of the MPL was not distributed with this
3+
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
4+
%%
5+
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
6+
%%
7+
8+
-module(config_schema_SUITE).
9+
10+
-compile(export_all).
11+
12+
all() ->
13+
[
14+
run_snippets
15+
].
16+
17+
%% -------------------------------------------------------------------
18+
%% Testsuite setup/teardown.
19+
%% -------------------------------------------------------------------
20+
21+
init_per_suite(Config) ->
22+
rabbit_ct_helpers:log_environment(),
23+
Config1 = rabbit_ct_helpers:run_setup_steps(Config),
24+
rabbit_ct_config_schema:init_schemas(rabbitmq_aws, Config1).
25+
26+
end_per_suite(Config) ->
27+
rabbit_ct_helpers:run_teardown_steps(Config).
28+
29+
init_per_testcase(Testcase, Config) ->
30+
rabbit_ct_helpers:testcase_started(Config, Testcase),
31+
Config1 = rabbit_ct_helpers:set_config(Config, [
32+
{rmq_nodename_suffix, Testcase}
33+
]),
34+
rabbit_ct_helpers:run_steps(Config1,
35+
rabbit_ct_broker_helpers:setup_steps() ++
36+
rabbit_ct_client_helpers:setup_steps()).
37+
38+
end_per_testcase(Testcase, Config) ->
39+
Config1 = rabbit_ct_helpers:run_steps(Config,
40+
rabbit_ct_client_helpers:teardown_steps() ++
41+
rabbit_ct_broker_helpers:teardown_steps()),
42+
rabbit_ct_helpers:testcase_finished(Config1, Testcase).
43+
44+
%% -------------------------------------------------------------------
45+
%% Testcases.
46+
%% -------------------------------------------------------------------
47+
48+
run_snippets(Config) ->
49+
ok = rabbit_ct_broker_helpers:rpc(Config, 0,
50+
?MODULE, run_snippets1, [Config]).
51+
52+
run_snippets1(Config) ->
53+
rabbit_ct_config_schema:run_snippets(Config).
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[
2+
{rabbitmq_aws_prefer_imdsv2_false,
3+
"aws.prefer_imdsv2 = false",
4+
[{rabbit, [
5+
{aws_prefer_imdsv2, false}
6+
]}],
7+
[rabbitmq_aws]},
8+
9+
{rabbitmq_aws_prefer_imdsv2_true,
10+
"aws.prefer_imdsv2 = true",
11+
[{rabbit, [
12+
{aws_prefer_imdsv2, true}
13+
]}],
14+
[rabbitmq_aws]}
15+
].

0 commit comments

Comments
 (0)