Skip to content

Commit

Permalink
Failing test case for bug GitTools#1255
Browse files Browse the repository at this point in the history
  • Loading branch information
dpurge authored and asbjornu committed May 20, 2019
1 parent 955d964 commit 208be41
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/GitVersionCore.Tests/IntegrationTests/MasterScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,36 @@ public void AreTagsNotAdheringToTagPrefixIgnored()
fixture.AssertFullSemver(config, "0.1.0+6"); //Fallback version + 6 commits since tag
}
}

[Test]
public void Bug1255()
{
var config = new Config
{
NextVersion = "5.0",
Branches =
{
{
"master", new BranchConfig
{
Regex = "master",
Tag = "beta",
Increment = IncrementStrategy.Patch,
VersioningMode = VersioningMode.ContinuousDeployment
}
}
}
};
using (var fixture = new EmptyRepositoryFixture())
{
fixture.Repository.MakeACommit();
fixture.AssertFullSemver(config, "5.0.0-beta.0"); // why not "5.0.0-beta.1"?
fixture.Repository.MakeACommit();
fixture.AssertFullSemver(config, "5.0.0-beta.1");
fixture.Repository.MakeATaggedCommit("v5.0.0-rc.1");
fixture.AssertFullSemver(config, "5.0.0-rc.1");
fixture.Repository.MakeACommit();
fixture.AssertFullSemver(config, "5.0.1-beta.1"); // test fails here, it generates "5.0.0-beta.1" which is not unique and lower than "5.0.0-rc.1"
}
}
}

0 comments on commit 208be41

Please sign in to comment.