@@ -45,7 +45,8 @@ groups() ->
45
45
import_case12 ,
46
46
import_case13 ,
47
47
import_case14 ,
48
- import_case15
48
+ import_case15 ,
49
+ import_case16
49
50
]},
50
51
51
52
{boot_time_import_using_classic_source , [], [
@@ -206,6 +207,28 @@ import_case13(Config) ->
206
207
import_case14 (Config ) -> import_file_case (Config , " case14" ).
207
208
% % contains a user with tags as a list
208
209
import_case15 (Config ) -> import_file_case (Config , " case15" ).
210
+ % % contains a virtual host with tags
211
+ import_case16 (Config ) ->
212
+ case rabbit_ct_broker_helpers :enable_feature_flag (Config , virtual_host_metadata ) of
213
+ ok ->
214
+ import_file_case (Config , " case16" ),
215
+ VHost = <<" tagged" >>,
216
+ VHostIsImported =
217
+ fun () ->
218
+ case vhost_lookup (Config , VHost ) of
219
+ {error , {no_such_vhosts , _ }} -> false ;
220
+ _ -> true
221
+ end
222
+ end ,
223
+ rabbit_ct_helpers :await_condition (VHostIsImported , 20000 ),
224
+ VHostRec = vhost_lookup (Config , VHost ),
225
+ ? assertEqual (<<" A case16 description" >>, vhost :get_description (VHostRec )),
226
+ ? assertEqual ([multi_dc_replication ,ab ,cde ], vhost :get_tags (VHostRec )),
227
+
228
+ ok ;
229
+ Skip ->
230
+ Skip
231
+ end .
209
232
210
233
export_import_round_trip_case1 (Config ) ->
211
234
% % case 6 has runtime parameters that do not depend on any plugins
@@ -338,3 +361,6 @@ run_invalid_import_case(Path) ->
338
361
339
362
queue_lookup (Config , VHost , Name ) ->
340
363
rabbit_ct_broker_helpers :rpc (Config , 0 , rabbit_amqqueue , lookup , [rabbit_misc :r (VHost , queue , Name )]).
364
+
365
+ vhost_lookup (Config , VHost ) ->
366
+ rabbit_ct_broker_helpers :rpc (Config , 0 , rabbit_vhost , lookup , [VHost ]).
0 commit comments