Skip to content

Commit

Permalink
Only run mochiweb_session tests if OTP25 on GHA
Browse files Browse the repository at this point in the history
As it will use OpenSSL - and OTP 24 has missing fix for OpenSSL.

Mochiweb in Riak makes no use of mochiweb_session.
  • Loading branch information
martinsumner committed Sep 26, 2024
1 parent 9e104f3 commit 2958d35
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/mochiweb_session.erl
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@ gen_hmac(ExpirationTime, Data, SessionKey, Key) ->
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").

-if(?OTP_RELEASE >= 25).
-define(SSL_TEST_OK, true).
-else.
-ifdef(GITHUBEXCLUDE).
-define(SSL_TEST_OK, false).
-else.
-define(SSL_TEST_OK, true).
-endif.
-endif.

-if(?SSL_TEST_OK).
generate_check_session_cookie_test_() ->
{setup,
fun setup_server_key/0,
Expand Down Expand Up @@ -227,3 +238,5 @@ generate_check_session_cookie([ServerKey, TS]) ->
TS, Id, ServerKey))
].
-endif.

-endif.

0 comments on commit 2958d35

Please sign in to comment.