mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
Minor in-memory repository test improvement
This commit is contained in:
@@ -374,6 +374,6 @@ namespace Tgstation.Server.Host.Components
|
||||
/// <summary>
|
||||
/// Test that the <see cref="repositoryFactory"/> is functional.
|
||||
/// </summary>
|
||||
private void CheckSystemCompatibility() => repositoryFactory.CreateInMemory().Dispose();
|
||||
private void CheckSystemCompatibility() => repositoryFactory.CreateInMemory();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ namespace Tgstation.Server.Host.Components.Repository
|
||||
interface ILibGit2RepositoryFactory : ICredentialsProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Create an in-memeory <see cref="LibGit2Sharp.IRepository"/>.
|
||||
/// Create and destory an in-memeory <see cref="LibGit2Sharp.IRepository"/>.
|
||||
/// </summary>
|
||||
/// <returns>A new in-memory <see cref="LibGit2Sharp.IRepository"/>.</returns>
|
||||
LibGit2Sharp.IRepository CreateInMemory();
|
||||
/// <remarks>Used as a test of the libgit2 native library.</remarks>
|
||||
void CreateInMemory();
|
||||
|
||||
/// <summary>
|
||||
/// Load a <see cref="LibGit2Sharp.IRepository"/> from a given <paramref name="path"/>.
|
||||
|
||||
@@ -28,10 +28,11 @@ namespace Tgstation.Server.Host.Components.Repository
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public LibGit2Sharp.IRepository CreateInMemory()
|
||||
public void CreateInMemory()
|
||||
{
|
||||
logger.LogTrace("Creating in-memory libgit2 repository...");
|
||||
return new LibGit2Sharp.Repository();
|
||||
using var _ = new LibGit2Sharp.Repository();
|
||||
logger.LogTrace("Success");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user