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 Oct 25, 2022
1 parent b9e5ff6 commit c241f2b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/GitVersion.Core.Tests/IntegrationTests/MainScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,4 +380,36 @@ public void PreventDecrementationOfVersionsOnTheDevelopmentBranch()
// ✅ succeeds as expected
fixture.AssertFullSemver("1.1.0-alpha.3", configurationBuilder.Build());
}

[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 c241f2b

Please sign in to comment.