Skip to content

Commit

Permalink
Fix up submodule handling in managed git
Browse files Browse the repository at this point in the history
Fixes #125 by enabling the test that now passes.
  • Loading branch information
AArnott committed Jun 12, 2021
1 parent ed2759e commit daa0303
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/NerdBank.GitVersioning.Tests/VersionOracleTests.cs
Expand Up @@ -49,19 +49,17 @@ public void NotRepo()
Assert.Equal(0, oracle.VersionHeight);
}

[Fact(Skip = "Unstable test. See issue #125")]
[Fact]
public void Submodule_RecognizedWithCorrectVersion()
{
using (var expandedRepo = TestUtilities.ExtractRepoArchive("submodules"))
{
this.Context = this.CreateGitContext(expandedRepo.RepoPath);

this.Context.RepoRelativeProjectDirectory = "a";
this.Context = this.CreateGitContext(Path.Combine(expandedRepo.RepoPath, "a"));
var oracleA = new VersionOracle(this.Context);
Assert.Equal("1.3.1", oracleA.SimpleVersion.ToString());
Assert.Equal("e238b03e75", oracleA.GitCommitIdShort);

this.Context.RepoRelativeProjectDirectory = Path.Combine("b", "projB");
this.Context = this.CreateGitContext(Path.Combine(expandedRepo.RepoPath, "b", "projB"));
var oracleB = new VersionOracle(this.Context);
Assert.Equal("2.5.2", oracleB.SimpleVersion.ToString());
Assert.Equal("3ea7f010c3", oracleB.GitCommitIdShort);
Expand Down

0 comments on commit daa0303

Please sign in to comment.