Native cipher test should only be enabled on Linux
This commit is contained in:
@@ -2,6 +2,7 @@ package com.velocitypowered.natives.encryption;
|
|||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
import static org.junit.jupiter.api.Assertions.fail;
|
import static org.junit.jupiter.api.Assertions.fail;
|
||||||
|
import static org.junit.jupiter.api.condition.OS.LINUX;
|
||||||
|
|
||||||
import com.velocitypowered.natives.util.Natives;
|
import com.velocitypowered.natives.util.Natives;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
@@ -13,6 +14,7 @@ import java.util.function.Supplier;
|
|||||||
import javax.crypto.spec.SecretKeySpec;
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.condition.EnabledOnOs;
|
||||||
|
|
||||||
class VelocityCipherTest {
|
class VelocityCipherTest {
|
||||||
|
|
||||||
@@ -29,6 +31,7 @@ class VelocityCipherTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@EnabledOnOs({LINUX})
|
||||||
void nativeIntegrityCheck() throws GeneralSecurityException {
|
void nativeIntegrityCheck() throws GeneralSecurityException {
|
||||||
VelocityCipherFactory factory = Natives.cipher.get();
|
VelocityCipherFactory factory = Natives.cipher.get();
|
||||||
if (factory == JavaVelocityCipher.FACTORY) {
|
if (factory == JavaVelocityCipher.FACTORY) {
|
||||||
|
Reference in New Issue
Block a user