Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MINOR] Fix pki tests condition check on mac #6387

Merged
Prev Previous commit
Next Next commit
Fix pki unit tests on mac - Junit 5
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
  • Loading branch information
Gabriel-Trintinalia committed Jan 11, 2024
commit 3dbdbe0c9ea25466412a32a780ecfe8beea30ded
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.OS;

public class HardwareKeyStoreFileWrapperTest extends BaseKeyStoreFileWrapperTest {

Expand Down Expand Up @@ -67,8 +68,9 @@ private static KeyStoreWrapper getHardwareKeyStoreWrapper(final String cfgName)
} catch (final Exception e) {
// nss3 is difficult to setup on mac correctly, don't let it break unit tests for dev
// machines.
Assumptions.assumeTrue(
false, "Failed to initialize hardware keystore: " + e.getLocalizedMessage());
Assumptions.assumeFalse(
OS.MAC.isCurrentOs(),
"Failed to initialize hardware keystore: " + e.getLocalizedMessage());
// Not a mac, probably a production build. Full failure.
throw new PkiException("Failed to initialize hardware keystore", e);
}
Expand Down