Skip to content

Commit a1f918a

Browse files
committed
amqp_auth_SUITE: Handle error in init_per_group/2
(cherry picked from commit b7c9e64)
1 parent 7f6a797 commit a1f918a

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

deps/rabbit/test/amqp_auth_SUITE.erl

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,17 @@ init_per_group(Group, Config0) ->
112112
Config1,
113113
rabbit_ct_broker_helpers:setup_steps() ++
114114
rabbit_ct_client_helpers:setup_steps()),
115-
Vhost = <<"test vhost">>,
116-
User = <<"test user">>,
117-
ok = rabbit_ct_broker_helpers:add_vhost(Config, Vhost),
118-
ok = rabbit_ct_broker_helpers:add_user(Config, User),
119-
[{test_vhost, Vhost},
120-
{test_user, User}] ++ Config.
115+
case Config of
116+
_ when is_list(Config) ->
117+
Vhost = <<"test vhost">>,
118+
User = <<"test user">>,
119+
ok = rabbit_ct_broker_helpers:add_vhost(Config, Vhost),
120+
ok = rabbit_ct_broker_helpers:add_user(Config, User),
121+
[{test_vhost, Vhost},
122+
{test_user, User}] ++ Config;
123+
{skip, _} = Skip ->
124+
Skip
125+
end.
121126

122127
end_per_group(_Group, Config) ->
123128
ok = rabbit_ct_broker_helpers:delete_user(Config, ?config(test_user, Config)),

0 commit comments

Comments
 (0)