Skip to content

Commit

Permalink
GitToolsGH-1885 reproduction of the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Nov 5, 2019
1 parent 58739ba commit e29e740
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/GitVersionCore.Tests/GitVersionExecutorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,27 @@ public void CacheKeySameAfterReNormalizing()
});
}

[Test]
public void GitPreparerShouldFailWhenTargetPathNotInitialized()
{
RepositoryScope((fixture, vv) =>
{
var targetUrl = "https://github.com/GitTools/GitVersion.git";
var arguments = new Arguments
{
TargetUrl = targetUrl,
TargetPath = null
};
var options = Options.Create(arguments);
Should.Throw<NullReferenceException>(() => new GitPreparer(log, environment, options));
arguments.TargetPath = fixture.RepositoryPath;
Should.NotThrow(() => new GitPreparer(log, environment, options));
});
}

[Test]
[Category("NoMono")]
[Description("LibGit2Sharp fails here when running under Mono")]
Expand Down

0 comments on commit e29e740

Please sign in to comment.