Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLVS-1477 Add more logs to new migration #5720

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public async Task MigrateBindingToServerConnectionIfNeeded_ConnectionsStorageFil
serverConnectionsRepository.Received(1).ConnectionsFileExists();
serverConnectionsRepository.DidNotReceiveWithAnyArgs().TryAdd(default);
unintrusiveBindingPathProvider.DidNotReceive().GetBindingPaths();
logger.Received(1).WriteLine(MigrationStrings.ConnectionMigration_NoMigration);
}

[TestMethod]
Expand All @@ -118,6 +119,7 @@ public async Task MigrateBindingToServerConnectionIfNeeded_ConnectionsStorageDoe
unintrusiveBindingPathProvider.GetBindingPaths();
serverConnectionsRepository.TryAdd(Arg.Any<ServerConnection>());
serverConnectionsRepository.TryAdd(Arg.Any<ServerConnection>());
logger.WriteLine(MigrationStrings.ConnectionMigration_EndMigration);
});
}

Expand Down
2 changes: 2 additions & 0 deletions src/ConnectedMode/Migration/BindingToConnectionMigration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ private void MigrateBindingToServerConnectionIfNeeded()
{
if (serverConnectionsRepository.ConnectionsFileExists())
{
logger.WriteLine(MigrationStrings.ConnectionMigration_NoMigration);
return;
}

Expand All @@ -96,6 +97,7 @@ private void MigrateBindingToServerConnectionIfNeeded()
{
MigrateBindingToServerConnection(bindingPath);
}
logger.WriteLine(MigrationStrings.ConnectionMigration_EndMigration);
}

private void MigrateBindingToServerConnection(string bindingFilePath)
Expand Down
18 changes: 18 additions & 0 deletions src/ConnectedMode/Migration/MigrationStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/ConnectedMode/Migration/MigrationStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,10 @@
<data name="ConnectionsJson_DoesNotExist" xml:space="preserve">
<value>[Migration] Connections.json file does not exist. The new migration has to be performed first.</value>
</data>
<data name="ConnectionMigration_EndMigration" xml:space="preserve">
<value>[Connection Migration] End migrating connections from existing bindings</value>
</data>
<data name="ConnectionMigration_NoMigration" xml:space="preserve">
<value>[Connection Migration] Connections.json exists. Migrating connections from existing bindings was not performed</value>
</data>
</root>