diff --git a/test/quicer_SUITE.erl b/test/quicer_SUITE.erl index 4e48801a..66567fa5 100644 --- a/test/quicer_SUITE.erl +++ b/test/quicer_SUITE.erl @@ -44,6 +44,7 @@ tc_lib_registration_1/1, tc_lib_re_registration/1, tc_lib_registration_neg/1, + tc_setopt_global_lb_mode_ifip/1, tc_open_listener_inval_reg/1, tc_stream_client_init/1, @@ -3081,6 +3082,19 @@ tc_stream_get_owner_remote(Config) -> SPid ! done, ensure_server_exit_normal(Ref). +tc_setopt_global_lb_mode_ifip(_Config) -> + {ok, _} = application:ensure_all_started(quicer), + true = code:soft_purge(quicer_nif), + true = code:delete(quicer_nif), + application:set_env(quicer, lb_mode, ?QUICER_LOAD_BALANCING_IFIP_AS_SERVER_ID), + %% If test fail ensure we have this netdev `lo' + application:set_env(quicer, lb_dev, "lo"), + quicer:reg_close(), + quicer:close_lib(), + {ok, _} = quicer:open_lib(), + ?assertEqual({ok, 2}, + quicer:getopt(quic_global, load_balacing_mode)). + %%% ==================== %%% Internal helpers %%% ====================