Skip to content

Commit

Permalink
(GH-2456) Add additional test for Azure Pipelines
Browse files Browse the repository at this point in the history
Since this is where the original issue was reported.
  • Loading branch information
gep13 authored and arturcic committed Feb 6, 2021
1 parent 83d172f commit 73e51be
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/GitVersion.App.Tests/TagCheckoutInBuildAgentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ namespace GitVersion.App.Tests
[TestFixture]
public class TagCheckoutInBuildAgentTests
{
[Test]
public async Task VerifyTagCheckoutOnAzurePipelines()
{
var env = new Dictionary<string, string>
{
{ AzurePipelines.EnvironmentVariableName, "true" },
{ "BUILD_SOURCEBRANCH", "refs/tags/0.2.0" },
};

await VerifyTagCheckoutVersionIsCalculatedProperly(env);
}

[Test]
public async Task VerifyTagCheckoutOnGitHubActions()
{
Expand All @@ -23,6 +35,11 @@ public async Task VerifyTagCheckoutOnGitHubActions()
{ "GITHUB_REF", "ref/tags/0.2.0" },
};

await VerifyTagCheckoutVersionIsCalculatedProperly(env);
}

private static async Task VerifyTagCheckoutVersionIsCalculatedProperly(Dictionary<string, string> env)
{
using var fixture = new EmptyRepositoryFixture();
var remoteRepositoryPath = PathHelper.GetTempPath();
RepositoryFixtureBase.Init(remoteRepositoryPath);
Expand Down

0 comments on commit 73e51be

Please sign in to comment.