Skip to content

Commit

Permalink
Merge pull request #581 from Jericho/inconclusive_integration_tests
Browse files Browse the repository at this point in the history
Mark the Release Notes Builder integration test as "inconclusive" whe…
  • Loading branch information
gep13 authored Jul 10, 2024
2 parents 8c41f54 + bff555d commit 8987ebd
Showing 1 changed file with 21 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public void Configure()
Log.Logger = _logger;

_token = Environment.GetEnvironmentVariable("GITTOOLS_GITHUB_TOKEN");
if (string.IsNullOrWhiteSpace(_token))
{
Assert.Inconclusive("Unable to locate credentials for accessing GitHub API");
}

_gitHubClient = new GitHubClient(new ProductHeaderValue("GitReleaseManager")) { Credentials = new Credentials(_token) };
}

Expand All @@ -50,44 +55,30 @@ public void TearDown()
[Explicit]
public async Task SingleMilestone()
{
if (string.IsNullOrWhiteSpace(_token))
{
Assert.Inconclusive("Unable to locate credentials for accessing GitHub API");
}
else
{
var fileSystem = new FileSystem(new CreateSubOptions());
var currentDirectory = Environment.CurrentDirectory;
var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);
var fileSystem = new FileSystem(new CreateSubOptions());
var currentDirectory = Environment.CurrentDirectory;
var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);

var vcsProvider = new GitHubProvider(_gitHubClient, _mapper);
var releaseNotesBuilder = new ReleaseNotesBuilder(vcsProvider, _logger, fileSystem, configuration, new TemplateFactory(fileSystem, configuration, TemplateKind.Create));
var result = await releaseNotesBuilder.BuildReleaseNotesAsync("Chocolatey", "ChocolateyGUI", "0.12.4", ReleaseTemplates.DEFAULT_NAME).ConfigureAwait(false);
Debug.WriteLine(result);
ClipBoardHelper.SetClipboard(result);
}
var vcsProvider = new GitHubProvider(_gitHubClient, _mapper);
var releaseNotesBuilder = new ReleaseNotesBuilder(vcsProvider, _logger, fileSystem, configuration, new TemplateFactory(fileSystem, configuration, TemplateKind.Create));
var result = await releaseNotesBuilder.BuildReleaseNotesAsync("Chocolatey", "ChocolateyGUI", "0.12.4", ReleaseTemplates.DEFAULT_NAME).ConfigureAwait(false);
Debug.WriteLine(result);
ClipBoardHelper.SetClipboard(result);
}

[Test]
[Explicit]
public async Task SingleMilestone3()
{
if (string.IsNullOrWhiteSpace(_token))
{
Assert.Inconclusive("Unable to locate credentials for accessing GitHub API");
}
else
{
var fileSystem = new FileSystem(new CreateSubOptions());
var currentDirectory = Environment.CurrentDirectory;
var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);
var fileSystem = new FileSystem(new CreateSubOptions());
var currentDirectory = Environment.CurrentDirectory;
var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);

var vcsProvider = new GitHubProvider(_gitHubClient, _mapper);
var releaseNotesBuilder = new ReleaseNotesBuilder(vcsProvider, _logger, fileSystem, configuration, new TemplateFactory(fileSystem, configuration, TemplateKind.Create));
var result = await releaseNotesBuilder.BuildReleaseNotesAsync("Chocolatey", "ChocolateyGUI", "0.13.0", ReleaseTemplates.DEFAULT_NAME).ConfigureAwait(false);
Debug.WriteLine(result);
ClipBoardHelper.SetClipboard(result);
}
var vcsProvider = new GitHubProvider(_gitHubClient, _mapper);
var releaseNotesBuilder = new ReleaseNotesBuilder(vcsProvider, _logger, fileSystem, configuration, new TemplateFactory(fileSystem, configuration, TemplateKind.Create));
var result = await releaseNotesBuilder.BuildReleaseNotesAsync("Chocolatey", "ChocolateyGUI", "0.13.0", ReleaseTemplates.DEFAULT_NAME).ConfigureAwait(false);
Debug.WriteLine(result);
ClipBoardHelper.SetClipboard(result);
}

[Test]
Expand Down

0 comments on commit 8987ebd

Please sign in to comment.