From b9183accb61affe71f8b4bf9532c91aea8f5b937 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 17 Mar 2022 04:05:07 -0300 Subject: [PATCH] fix: teste path --- .../NetDevPack.Security.Jwt.Tests/Warmups/WarmupFileStore.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/NetDevPack.Security.Jwt.Tests/Warmups/WarmupFileStore.cs b/tests/NetDevPack.Security.Jwt.Tests/Warmups/WarmupFileStore.cs index 8e0cf54..fefcfdd 100644 --- a/tests/NetDevPack.Security.Jwt.Tests/Warmups/WarmupFileStore.cs +++ b/tests/NetDevPack.Security.Jwt.Tests/Warmups/WarmupFileStore.cs @@ -1,4 +1,5 @@ using System.IO; +using System.Runtime.InteropServices; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using NetDevPack.Security.Jwt.Core; @@ -16,7 +17,8 @@ public WarmupFileStore() var serviceCollection = new ServiceCollection(); serviceCollection.AddLogging(); serviceCollection.AddMemoryCache(); - serviceCollection.AddJwksManager().PersistKeysToFileSystem(new DirectoryInfo(Path.Combine(Directory.GetCurrentDirectory(), "/filestore"))); + if(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + serviceCollection.AddJwksManager().PersistKeysToFileSystem(new DirectoryInfo(Path.Combine(Directory.GetCurrentDirectory(), "/filestore"))); Services = serviceCollection.BuildServiceProvider(); _jsonWebKeyStore = Services.GetRequiredService();