Skip to content

Commit 1ad80b4

Browse files
committed
Fix the false value of the OpenSSL.fips_mode affecting other tests.
We need to reset the `false` value of the `OpenSSL.fips_mode` not to affect other tests.
1 parent 6854404 commit 1ad80b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/openssl/test_fips.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ def test_fips_mode_get_is_false_on_fips_mode_disabled
2828
end
2929

3030
def test_fips_mode_is_reentrant
31+
original_fips_mode = OpenSSL.fips_mode
32+
3133
OpenSSL.fips_mode = false
3234
OpenSSL.fips_mode = false
35+
ensure
36+
OpenSSL.fips_mode = original_fips_mode
3337
end
3438

3539
def test_fips_mode_get_with_fips_mode_set

0 commit comments

Comments
 (0)