Skip to content

Commit abc61e8

Browse files
committed
config_schema_SUITE: Handle error returned by rabbit_ct_*
[Why] It didn't handle them before and crashed later when it assumed the return value was a list.
1 parent 165b227 commit abc61e8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

deps/rabbitmq_mqtt/test/config_schema_SUITE.erl

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ all() ->
2121
init_per_suite(Config) ->
2222
rabbit_ct_helpers:log_environment(),
2323
Config1 = rabbit_ct_helpers:run_setup_steps(Config),
24-
rabbit_ct_config_schema:init_schemas(rabbitmq_mqtt, Config1).
24+
case Config1 of
25+
_ when is_list(Config1) ->
26+
rabbit_ct_config_schema:init_schemas(rabbitmq_mqtt, Config1);
27+
{skip, _} ->
28+
Config1
29+
end.
2530

2631

2732
end_per_suite(Config) ->
@@ -37,8 +42,13 @@ init_per_testcase(Testcase, Config) ->
3742
Config1,
3843
rabbit_ct_broker_helpers:setup_steps() ++
3944
rabbit_ct_client_helpers:setup_steps()),
40-
util:enable_plugin(Config2, rabbitmq_mqtt),
41-
Config2.
45+
case Config2 of
46+
_ when is_list(Config2) ->
47+
util:enable_plugin(Config2, rabbitmq_mqtt),
48+
Config2;
49+
{skip, _} ->
50+
Config2
51+
end.
4252

4353
end_per_testcase(Testcase, Config) ->
4454
Config1 = rabbit_ct_helpers:run_steps(Config,

0 commit comments

Comments
 (0)