Skip to content

Commit daa0303

Browse files
committed
Fix up submodule handling in managed git
Fixes #125 by enabling the test that now passes.
1 parent ed2759e commit daa0303

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/NerdBank.GitVersioning.Tests/VersionOracleTests.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,17 @@ public void NotRepo()
4949
Assert.Equal(0, oracle.VersionHeight);
5050
}
5151

52-
[Fact(Skip = "Unstable test. See issue #125")]
52+
[Fact]
5353
public void Submodule_RecognizedWithCorrectVersion()
5454
{
5555
using (var expandedRepo = TestUtilities.ExtractRepoArchive("submodules"))
5656
{
57-
this.Context = this.CreateGitContext(expandedRepo.RepoPath);
58-
59-
this.Context.RepoRelativeProjectDirectory = "a";
57+
this.Context = this.CreateGitContext(Path.Combine(expandedRepo.RepoPath, "a"));
6058
var oracleA = new VersionOracle(this.Context);
6159
Assert.Equal("1.3.1", oracleA.SimpleVersion.ToString());
6260
Assert.Equal("e238b03e75", oracleA.GitCommitIdShort);
6361

64-
this.Context.RepoRelativeProjectDirectory = Path.Combine("b", "projB");
62+
this.Context = this.CreateGitContext(Path.Combine(expandedRepo.RepoPath, "b", "projB"));
6563
var oracleB = new VersionOracle(this.Context);
6664
Assert.Equal("2.5.2", oracleB.SimpleVersion.ToString());
6765
Assert.Equal("3ea7f010c3", oracleB.GitCommitIdShort);

0 commit comments

Comments
 (0)