definition_import_SUITE: a new case
that features a deletion-protected virtual host.
This commit is contained in:
parent
315c247231
commit
1d88a9d28f
|
@ -53,7 +53,8 @@ groups() ->
|
||||||
import_case18,
|
import_case18,
|
||||||
import_case19,
|
import_case19,
|
||||||
import_case20,
|
import_case20,
|
||||||
import_case21
|
import_case21,
|
||||||
|
import_case22
|
||||||
]},
|
]},
|
||||||
|
|
||||||
{boot_time_import_using_classic_source, [], [
|
{boot_time_import_using_classic_source, [], [
|
||||||
|
@ -315,6 +316,25 @@ import_case20(Config) ->
|
||||||
|
|
||||||
import_case21(Config) -> import_invalid_file_case(Config, "failing_case21").
|
import_case21(Config) -> import_invalid_file_case(Config, "failing_case21").
|
||||||
|
|
||||||
|
import_case22(Config) ->
|
||||||
|
import_file_case(Config, "case22"),
|
||||||
|
Name = <<"protected">>,
|
||||||
|
VirtualHostIsImported =
|
||||||
|
fun () ->
|
||||||
|
case vhost_lookup(Config, Name) of
|
||||||
|
{error, not_found} -> false;
|
||||||
|
_ -> true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
rabbit_ct_helpers:await_condition(VirtualHostIsImported, 20000),
|
||||||
|
VHost = vhost_lookup(Config, Name),
|
||||||
|
?assertEqual(true, vhost:is_protected_from_deletion(VHost)),
|
||||||
|
|
||||||
|
VHost2 = vhost_lookup(Config, <<"non-protected">>),
|
||||||
|
?assertEqual(false, vhost:is_protected_from_deletion(VHost2)),
|
||||||
|
|
||||||
|
ok.
|
||||||
|
|
||||||
export_import_round_trip_case1(Config) ->
|
export_import_round_trip_case1(Config) ->
|
||||||
case rabbit_ct_helpers:is_mixed_versions() of
|
case rabbit_ct_helpers:is_mixed_versions() of
|
||||||
false ->
|
false ->
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
{
|
||||||
|
"bindings": [],
|
||||||
|
"exchanges": [],
|
||||||
|
"global_parameters": [
|
||||||
|
{
|
||||||
|
"name": "cluster_name",
|
||||||
|
"value": "rabbitmq@localhost"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [],
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"configure": ".*",
|
||||||
|
"read": ".*",
|
||||||
|
"user": "guest",
|
||||||
|
"vhost": "/",
|
||||||
|
"write": ".*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"policies": [],
|
||||||
|
"queues": [],
|
||||||
|
"rabbit_version": "4.0.5",
|
||||||
|
"rabbitmq_version": "4.0.5",
|
||||||
|
"topic_permissions": [],
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"hashing_algorithm": "rabbit_password_hashing_sha256",
|
||||||
|
"limits": {"max-connections" : 2},
|
||||||
|
"name": "limited_guest",
|
||||||
|
"password_hash": "wS4AT3B4Z5RpWlFn1FA30osf2C75D7WA3gem591ACDZ6saO6",
|
||||||
|
"tags": [
|
||||||
|
"administrator"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vhosts": [
|
||||||
|
{
|
||||||
|
"limits": [],
|
||||||
|
"name": "non-protected",
|
||||||
|
"description": "",
|
||||||
|
"metadata": {
|
||||||
|
"description": "",
|
||||||
|
"tags": [],
|
||||||
|
"default_queue_type": "classic"
|
||||||
|
},
|
||||||
|
"tags": [],
|
||||||
|
"default_queue_type": "classic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "protected",
|
||||||
|
"description": "protected, DQT = quorum",
|
||||||
|
"metadata": {
|
||||||
|
"description": "DQT = quorum",
|
||||||
|
"tags": [],
|
||||||
|
"default_queue_type": "quorum",
|
||||||
|
"protected_from_deletion": true
|
||||||
|
},
|
||||||
|
"tags": [],
|
||||||
|
"default_queue_type": "quorum"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"limits": [],
|
||||||
|
"name": "tagged"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue