From 34507a92db3ecbdf23ffaa8546250c5ce4adcdb4 Mon Sep 17 00:00:00 2001 From: Major Date: Thu, 5 Mar 2020 11:02:22 +0000 Subject: [PATCH] Use unix configuration in jimfs tests Signed-off-by: Major --- .../src/test/java/dev/openrs2/common/crypto/RsaTest.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/src/test/java/dev/openrs2/common/crypto/RsaTest.kt b/common/src/test/java/dev/openrs2/common/crypto/RsaTest.kt index ab029fbd..0f51167b 100644 --- a/common/src/test/java/dev/openrs2/common/crypto/RsaTest.kt +++ b/common/src/test/java/dev/openrs2/common/crypto/RsaTest.kt @@ -1,5 +1,6 @@ package dev.openrs2.common.crypto +import com.google.common.jimfs.Configuration import com.google.common.jimfs.Jimfs import io.netty.buffer.Unpooled import org.bouncycastle.crypto.params.RSAKeyParameters @@ -114,7 +115,7 @@ object RsaTest { @Test fun testReadPublicKey() { - Jimfs.newFileSystem().use { fs -> + Jimfs.newFileSystem(Configuration.unix()).use { fs -> val file = Files.createTempFile(fs.getPath("/"), "public", ".key") try { Files.write(file, PUBLIC_KEY_PEM) @@ -131,7 +132,7 @@ object RsaTest { @Test fun testWritePublicKey() { - Jimfs.newFileSystem().use { fs -> + Jimfs.newFileSystem(Configuration.unix()).use { fs -> val file = Files.createTempFile(fs.getPath("/"), "public", ".key") try { Rsa.writePublicKey(file, PUBLIC_KEY) @@ -145,7 +146,7 @@ object RsaTest { @Test fun testReadPrivateKey() { - Jimfs.newFileSystem().use { fs -> + Jimfs.newFileSystem(Configuration.unix()).use { fs -> val file = Files.createTempFile(fs.getPath("/"), "private", ".key") try { Files.write(file, PRIVATE_KEY_PEM) @@ -168,7 +169,7 @@ object RsaTest { @Test fun testWritePrivateKey() { - Jimfs.newFileSystem().use { fs -> + Jimfs.newFileSystem(Configuration.unix()).use { fs -> val file = Files.createTempFile(fs.getPath("/"), "private", ".key") try { Rsa.writePrivateKey(file, PRIVATE_KEY_CRT)