Fix bug in GithubSource when an access token is not provided

This commit is contained in:
Caelan Sayler
2025-06-07 07:14:41 +01:00
committed by Caelan
parent b18fac7d96
commit ed8600eee5
5 changed files with 67 additions and 35 deletions

View File

@@ -20,6 +20,26 @@ public class GithubDeploymentTests
_output = output;
}
[Fact(Skip = "Need to create a repo to test with")]
public async Task TestUnauthenticatedDownload()
{
using var logger = _output.BuildLoggerFor<GithubDeploymentTests>();
using var _1 = TempUtil.GetTempDirectory(out var releaseDir);
var repo = new GitHubRepository(logger);
var options = new GitHubDownloadOptions {
TargetOs = RuntimeOs.Linux,
Channel = "linux-x64",
ReleaseDir = new DirectoryInfo(releaseDir),
Timeout = 60,
Prerelease = false,
RepoUrl = "TODO",
Token = null,
};
await repo.DownloadLatestFullPackageAsync(options);
}
[SkippableFact]
public void WillRefuseToUploadMultipleWithoutMergeArg()
{