Do not skip AZ signing test in CI

This commit is contained in:
Caelan Sayler
2024-12-03 07:16:59 +00:00
committed by Caelan
parent 04c11730e4
commit 2ee986fc7e
2 changed files with 6 additions and 6 deletions

View File

@@ -3,6 +3,8 @@ using Velopack;
public static class PathHelper
{
public static bool IsCI => Environment.GetEnvironmentVariable("CI") != null;
public static string GetFixturesDir()
=> Path.Combine(GetTestRoot(), "fixtures");

View File

@@ -40,15 +40,14 @@ public class TrustedSigningTests
public async void CanSignWithTrustedSigning()
{
Skip.IfNot(VelopackRuntimeInfo.IsWindows, "Only supported on Windows");
Skip.IfNot(await IsAuthenticatedForCodeSigningAsync(), "Sign in with az login first");
if (!PathHelper.IsCI) {
Skip.IfNot(await IsAuthenticatedForCodeSigningAsync(), "Sign in with az login first");
}
using var logger = _output.BuildLoggerFor<TrustedSigningTests>();
using var _ = TempUtil.GetTempDirectory(out var releaseDir);
string channel = string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("CI"))
? VelopackRuntimeInfo.SystemOs.GetOsShortName()
: "ci-" + VelopackRuntimeInfo.SystemOs.GetOsShortName();
string metadataFile = Path.Combine(releaseDir, "metadata.json");
File.WriteAllText(
metadataFile,
@@ -67,7 +66,6 @@ public class TrustedSigningTests
$"aztrusted-{DateTime.UtcNow.ToLongDateString()}",
releaseDir,
logger,
channel: channel,
azureTrustedSignFile: metadataFile);
var files = Directory.EnumerateFiles(releaseDir)