summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2021-08-19 23:03:09 +0300
committerMichael Klishin <michael@clojurewerkz.org>2021-08-19 23:03:09 +0300
commit11760f95bdf6322dd7b300be8701bf6235e4d8ae (patch)
tree63e5facd00270628fc0edd4e075740de00c85986
parent9e13b6f0b4217f90aa0e1e81789802afb76d7311 (diff)
downloadrabbitmq-server-git-11760f95bdf6322dd7b300be8701bf6235e4d8ae.tar.gz
Don't run #3319 assertions in mixed version clusters
-rw-r--r--deps/rabbitmq_management/test/rabbit_mgmt_only_http_SUITE.erl46
1 files changed, 26 insertions, 20 deletions
diff --git a/deps/rabbitmq_management/test/rabbit_mgmt_only_http_SUITE.erl b/deps/rabbitmq_management/test/rabbit_mgmt_only_http_SUITE.erl
index 06d30a396c..f760e1609c 100644
--- a/deps/rabbitmq_management/test/rabbit_mgmt_only_http_SUITE.erl
+++ b/deps/rabbitmq_management/test/rabbit_mgmt_only_http_SUITE.erl
@@ -261,26 +261,32 @@ vhosts_test(Config) ->
?assert(not maps:is_key(recv_oct, GetFirst)),
?assert(maps:is_key(cluster_state, GetFirst)),
- %% PUT can update metadata (description, tags)
- Desc0 = "desc 0",
- Meta0 = [
- {description, Desc0},
- {tags, "tag1,tag2"}
- ],
- http_put(Config, "/vhosts/myvhost", Meta0, {group, '2xx'}),
- #{description := Desc1, tags := Tags1} = http_get(Config, "/vhosts/myvhost", ?OK),
- ?assertEqual(Desc0, Desc1),
- ?assertEqual([<<"tag1">>, <<"tag2">>], Tags1),
-
- Desc2 = "desc 2",
- Meta2 = [
- {description, Desc2},
- {tags, "tag3"}
- ],
- http_put(Config, "/vhosts/myvhost", Meta2, {group, '2xx'}),
- #{description := Desc3, tags := Tags3} = http_get(Config, "/vhosts/myvhost", ?OK),
- ?assertEqual(Desc2, Desc3),
- ?assertEqual([<<"tag3">>], Tags3),
+ case rabbit_ct_helpers:is_mixed_versions() of
+ true ->
+ %% these won't pass for older 3.8 nodes
+ ok;
+ false ->
+ %% PUT can update metadata (description, tags)
+ Desc0 = "desc 0",
+ Meta0 = [
+ {description, Desc0},
+ {tags, "tag1,tag2"}
+ ],
+ http_put(Config, "/vhosts/myvhost", Meta0, {group, '2xx'}),
+ #{description := Desc1, tags := Tags1} = http_get(Config, "/vhosts/myvhost", ?OK),
+ ?assertEqual(Desc0, Desc1),
+ ?assertEqual([<<"tag1">>, <<"tag2">>], Tags1),
+
+ Desc2 = "desc 2",
+ Meta2 = [
+ {description, Desc2},
+ {tags, "tag3"}
+ ],
+ http_put(Config, "/vhosts/myvhost", Meta2, {group, '2xx'}),
+ #{description := Desc3, tags := Tags3} = http_get(Config, "/vhosts/myvhost", ?OK),
+ ?assertEqual(Desc2, Desc3),
+ ?assertEqual([<<"tag3">>], Tags3)
+ end,
%% Check individually
Get = http_get(Config, "/vhosts/%2F", ?OK),