Skip to content

Commit

Permalink
Don't specify C-drive for dummy file
Browse files Browse the repository at this point in the history
  • Loading branch information
ArveH committed Jun 26, 2024
1 parent c7023ce commit b5aca30
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/ABulkCopy.Common/Mapping/MappingFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ private void SetMappingsFromFile(IFileSystem fileSystem, string fileName)
}
catch (Exception ex)
{
_logger.Error(ex, "Error reading mappings file '{File}'",
fileName);
_logger.Error(ex, "Error reading mappings file {File}. Current directory is {CurrentDir}.",
fileName, fileSystem.Directory.GetCurrentDirectory());
throw new MappingsFileException($"Error reading mappings file '{fileName}'", ex);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/APostgres.Tests/PgTypeMapperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private void TestConvert(string tableName, IColumn defCol, string expectedType,
{ Constants.Config.MappingsFile, "mymappings.json" }
});
var fileSystem = new MockFileSystem();
fileSystem.AddFile(@"c:\mymappings.json", GetMappingFile(customMapping));
fileSystem.AddFile("mymappings.json", GetMappingFile(customMapping));

var typeConverter = new PgTypeMapper(
new PgParser(),
Expand Down
4 changes: 2 additions & 2 deletions src/CrossRDBMS.Tests/CopyFromMssToPg/CopyDateTimes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ public async Task CopyDateTimeOffset_To_TimeStampTz()

private void MapOnlyDateTimeOffsetToTimestampTz()
{
DummyFileSystem.AddFile(@"c:\mymappings.json", GetMappingFile(
DummyFileSystem.AddFile("mymappings.json", GetMappingFile(
" \"datetime\": \"timestamp\",\r\n" +
" \"datetime2\": \"timestamp\",\r\n" +
" \"datetimeoffset\": \"timestamp with time zone\"\r\n"));
}

private void MapAllDateTimesToTimestampTz()
{
DummyFileSystem.AddFile(@"c:\mymappings.json", GetMappingFile(
DummyFileSystem.AddFile("mymappings.json", GetMappingFile(
" \"datetime\": \"timestamp with time zone\",\r\n" +
" \"datetime2\": \"timestamp with time zone\",\r\n" +
" \"datetimeoffset\": \"timestamp with time zone\"\r\n"));
Expand Down
2 changes: 1 addition & 1 deletion src/CrossRDBMS.Tests/CopyFromMssToPg/CopyMisc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public async Task CopyBit_To_Int()

private void MapTo(string mapTo)
{
DummyFileSystem.AddFile(@"c:\mymappings.json", GetMappingFile(
DummyFileSystem.AddFile("mymappings.json", GetMappingFile(
$" \"bit\": \"{mapTo}\"\r\n"));
}
}
4 changes: 2 additions & 2 deletions src/CrossRDBMS.Tests/TestSchemas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public async Task TestFKInAnotherSchema()
IFileSystem fileSystem = new MockFileSystem(new Dictionary<string, MockFileData>
{
{
@"c:\mymappings.json", new MockFileData(
"mymappings.json", new MockFileData(
"{\r\n" +
" \"Schemas\": {\r\n" +
" \"\": \"public\",\r\n" +
Expand All @@ -52,7 +52,7 @@ public async Task TestFKInAnotherSchema()
Rdbms.Pg,
CmdArguments.Create(ParamHelper.GetInPg(
_fixture.PgConnectionString,
mappingsFile: @"c:\mymappings.json")),
mappingsFile: "mymappings.json")),
logMessages,
_output,
fileSystem);
Expand Down

0 comments on commit b5aca30

Please sign in to comment.