2727% %%===================================================================
2828
2929all () ->
30- [{group , tests }].
30+ [
31+ {group , tests },
32+ {group , ipv6 }
33+ ].
3134
3235all_tests () ->
3336 [single_node_write ,
@@ -84,10 +87,20 @@ all_tests() ->
8487 combine_ips_hosts_test ,
8588 empty_last_segment ].
8689
90+ % % Isolated to avoid test interference
91+ ipv6_tests () ->
92+ [
93+ cluster_write_replication_plain_ipv6 ,
94+ cluster_write_replication_tls_ipv6
95+ ].
96+
8797-define (BIN_SIZE , 800 ).
8898
8999groups () ->
90- [{tests , [], all_tests ()}].
100+ [
101+ {tests , [], all_tests ()},
102+ {ipv6 , [], ipv6_tests ()}
103+ ].
91104
92105init_per_suite (Config ) ->
93106 osiris :configure_logger (logger ),
@@ -96,10 +109,18 @@ init_per_suite(Config) ->
96109end_per_suite (_Config ) ->
97110 ok .
98111
112+ init_per_group (ipv6 , Config ) ->
113+ application :set_env (kernel , prevent_overlapping_partitions , false ),
114+ application :set_env (osiris , replica_ip_address_family , inet6 ),
115+ Config ;
99116init_per_group (_Group , Config ) ->
100117 application :set_env (kernel , prevent_overlapping_partitions , false ),
118+ application :set_env (osiris , replica_ip_address_family , inet ),
101119 Config .
102120
121+ end_per_group (ipv6 , _Config ) ->
122+ application :set_env (osiris , replica_ip_address_family , inet ),
123+ ok ;
103124end_per_group (_Group , _Config ) ->
104125 ok .
105126
@@ -154,6 +175,14 @@ extra_init(cluster_write_replication_tls) ->
154175 {verify ,verify_peer }
155176 ]),
156177 ok ;
178+ extra_init (cluster_write_replication_tls_ipv6 ) ->
179+ extra_init (cluster_write_replication_tls ),
180+ application :set_env (osiris , replica_ip_address_family , inet6 ),
181+ ok ;
182+ extra_init (cluster_write_replication_plain_ipv6 ) ->
183+ application :set_env (osiris , replication_transport , tcp ),
184+ application :set_env (osiris , replica_ip_address_family , inet6 ),
185+ ok ;
157186extra_init (_ ) ->
158187 application :set_env (osiris , replication_transport , tcp ),
159188 ok .
@@ -298,9 +327,15 @@ start_many_clusters(Config) ->
298327cluster_write_replication_plain (Config ) ->
299328 cluster_write (Config , undefined ).
300329
330+ cluster_write_replication_plain_ipv6 (Config ) ->
331+ cluster_write (Config , undefined ).
332+
301333cluster_write_replication_tls (Config ) ->
302334 cluster_write (Config , undefined ).
303335
336+ cluster_write_replication_tls_ipv6 (Config ) ->
337+ cluster_write (Config , undefined ).
338+
304339cluster_write_replication_plain_with_filter (Config ) ->
305340 cluster_write (Config , <<" banana" >>).
306341
0 commit comments