From bf9244d52ee023562af35fd658a5270603d15c85 Mon Sep 17 00:00:00 2001 From: Krzysztof Nozderko Date: Thu, 8 Feb 2024 13:27:24 +0100 Subject: [PATCH] fix tests under windows --- .../UnitTests/Configuration/EasyLoggingConfigGenerator.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Snowflake.Data.Tests/UnitTests/Configuration/EasyLoggingConfigGenerator.cs b/Snowflake.Data.Tests/UnitTests/Configuration/EasyLoggingConfigGenerator.cs index 708bf3a65..5c82c6681 100644 --- a/Snowflake.Data.Tests/UnitTests/Configuration/EasyLoggingConfigGenerator.cs +++ b/Snowflake.Data.Tests/UnitTests/Configuration/EasyLoggingConfigGenerator.cs @@ -12,9 +12,7 @@ public class EasyLoggingConfigGenerator public const string EmptyCommonConfig = @"{ ""common"": {} }"; - - // public static readonly string WorkingDirectory = Path.Combine(Path.GetTempPath(), "easy_logging_test_configs_", Path.GetRandomFileName()); - + public static string CreateConfigTempFile(string workingDirectory, string fileContent) { var filePath = NewConfigFilePath(workingDirectory); @@ -39,6 +37,7 @@ public static string Config(string logLevel, string logPath) ""log_path"": {logPath} } }" + .Replace("\\", "\\\\") .Replace("{logLevel}", SerializeParameter(logLevel)) .Replace("{logPath}", SerializeParameter(logPath)); }