@@ -34,7 +34,8 @@ groups() ->
34
34
ClusterSize1Tests = [
35
35
single_node_vhost_deletion_forces_connection_closure ,
36
36
vhost_failure_forces_connection_closure ,
37
- dead_vhost_connection_refused
37
+ dead_vhost_connection_refused ,
38
+ vhost_creation_idempotency
38
39
],
39
40
ClusterSize2Tests = [
40
41
cluster_vhost_deletion_forces_connection_closure ,
@@ -43,7 +44,8 @@ groups() ->
43
44
vhost_failure_forces_connection_closure_on_failure_node ,
44
45
dead_vhost_connection_refused_on_failure_node ,
45
46
node_starts_with_dead_vhosts ,
46
- node_starts_with_dead_vhosts_and_ignore_slaves
47
+ node_starts_with_dead_vhosts_and_ignore_slaves ,
48
+ vhost_creation_idempotency
47
49
],
48
50
[
49
51
{cluster_size_1_network , [], ClusterSize1Tests },
@@ -373,6 +375,16 @@ node_starts_with_dead_vhosts_and_ignore_slaves(Config) ->
373
375
true = rabbit_ct_broker_helpers :rpc (Config , 1 ,
374
376
rabbit_vhost_sup_sup , is_vhost_alive , [VHost2 ]).
375
377
378
+ vhost_creation_idempotency (Config ) ->
379
+ VHost = <<" idempotency-test" >>,
380
+ try
381
+ ? assertEqual (ok , rabbit_ct_broker_helpers :add_vhost (Config , VHost )),
382
+ ? assertEqual (ok , rabbit_ct_broker_helpers :add_vhost (Config , VHost )),
383
+ ? assertEqual (ok , rabbit_ct_broker_helpers :add_vhost (Config , VHost ))
384
+ after
385
+ rabbit_ct_broker_helpers :delete_vhost (Config , VHost )
386
+ end .
387
+
376
388
% % -------------------------------------------------------------------
377
389
% % Helpers
378
390
% % -------------------------------------------------------------------
0 commit comments