3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Native cipher test should only be enabled on Linux

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-10-27 01:53:43 -04:00
Ursprung bf81d20ba7
Commit 911aba1b45

Datei anzeigen

@ -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) {