Skip to content

Commit

Permalink
Remove fail_if_no_peer_cert from tls test
Browse files Browse the repository at this point in the history
As this is server only and fails on OTP 26.

Also fix server logging in osiris_SUITE
  • Loading branch information
kjnilsson committed Apr 14, 2023
1 parent c1c284e commit ad5adf7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/osiris_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ extra_init(cluster_write_replication_tls) ->
{certfile, TlsConfDir ++ "client_" ++ Hostname ++ "_certificate.pem"},
{keyfile, TlsConfDir ++ "client_" ++ Hostname ++ "_key.pem"},
{secure_renegotiate, true},
{verify,verify_peer},
{fail_if_no_peer_cert, true}
{verify,verify_peer}
]),
ok;
extra_init(_) ->
Expand Down Expand Up @@ -1916,7 +1915,6 @@ start_child_node(NodeName, PrivDir, ExtraAppConfig0) ->
end
end || K <- AllKeys],

ok = erpc:call(FinalNodeName, logger, set_primary_config, [level, all]),
_ = [ erpc:call(FinalNodeName, application, ensure_all_started, [App])
|| App <- AppsToStart],
Result.
Expand Down Expand Up @@ -2066,14 +2064,14 @@ node_setup(DataDir) ->
LogFile = filename:join([DataDir, "osiris.log"]),
SaslFile = filename:join([DataDir, "osiris_sasl.log"]),
_ = logger:set_primary_config(level, debug),
Config = #{config => #{type => {file, LogFile}}, level => debug},
_ = logger:add_handler(ra_handler, logger_std_h, Config),
Config = #{config => #{file => to_string(LogFile)}},
ok = logger:add_handler(osiris_handler, logger_std_h, Config),

_ = application:load(kernel),
application:set_env(kernel, prevent_overlapping_partitions, false),

_ = application:load(sasl),
application:set_env(sasl, sasl_error_logger, {file, SaslFile}),
application:set_env(sasl, sasl_error_logger, {file, to_string(SaslFile)}),
_ = application:stop(sasl),
_ = application:start(sasl),
_ = error_logger:tty(false),
Expand All @@ -2083,6 +2081,9 @@ node_setup(DataDir) ->

ok.

to_string(B) when is_binary(B) ->
binary_to_list(B).

simple(Bin) ->
S = byte_size(Bin),
<<0:1, S:31, Bin/binary>>.
Expand Down

0 comments on commit ad5adf7

Please sign in to comment.