Minor in-memory repository test improvement

This commit is contained in:
Jordan Brown
2021-01-02 16:56:38 -05:00
parent 4885b2c5b6
commit 229104bc41
3 changed files with 7 additions and 6 deletions
@@ -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 />