Skip to content

Commit 11760f9

Browse files
Don't run #3319 assertions in mixed version clusters
1 parent 9e13b6f commit 11760f9

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

deps/rabbitmq_management/test/rabbit_mgmt_only_http_SUITE.erl

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -261,26 +261,32 @@ vhosts_test(Config) ->
261261
?assert(not maps:is_key(recv_oct, GetFirst)),
262262
?assert(maps:is_key(cluster_state, GetFirst)),
263263

264-
%% PUT can update metadata (description, tags)
265-
Desc0 = "desc 0",
266-
Meta0 = [
267-
{description, Desc0},
268-
{tags, "tag1,tag2"}
269-
],
270-
http_put(Config, "/vhosts/myvhost", Meta0, {group, '2xx'}),
271-
#{description := Desc1, tags := Tags1} = http_get(Config, "/vhosts/myvhost", ?OK),
272-
?assertEqual(Desc0, Desc1),
273-
?assertEqual([<<"tag1">>, <<"tag2">>], Tags1),
274-
275-
Desc2 = "desc 2",
276-
Meta2 = [
277-
{description, Desc2},
278-
{tags, "tag3"}
279-
],
280-
http_put(Config, "/vhosts/myvhost", Meta2, {group, '2xx'}),
281-
#{description := Desc3, tags := Tags3} = http_get(Config, "/vhosts/myvhost", ?OK),
282-
?assertEqual(Desc2, Desc3),
283-
?assertEqual([<<"tag3">>], Tags3),
264+
case rabbit_ct_helpers:is_mixed_versions() of
265+
true ->
266+
%% these won't pass for older 3.8 nodes
267+
ok;
268+
false ->
269+
%% PUT can update metadata (description, tags)
270+
Desc0 = "desc 0",
271+
Meta0 = [
272+
{description, Desc0},
273+
{tags, "tag1,tag2"}
274+
],
275+
http_put(Config, "/vhosts/myvhost", Meta0, {group, '2xx'}),
276+
#{description := Desc1, tags := Tags1} = http_get(Config, "/vhosts/myvhost", ?OK),
277+
?assertEqual(Desc0, Desc1),
278+
?assertEqual([<<"tag1">>, <<"tag2">>], Tags1),
279+
280+
Desc2 = "desc 2",
281+
Meta2 = [
282+
{description, Desc2},
283+
{tags, "tag3"}
284+
],
285+
http_put(Config, "/vhosts/myvhost", Meta2, {group, '2xx'}),
286+
#{description := Desc3, tags := Tags3} = http_get(Config, "/vhosts/myvhost", ?OK),
287+
?assertEqual(Desc2, Desc3),
288+
?assertEqual([<<"tag3">>], Tags3)
289+
end,
284290

285291
%% Check individually
286292
Get = http_get(Config, "/vhosts/%2F", ?OK),

0 commit comments

Comments
 (0)