Use LogWarning in Utilities
This commit is contained in:
parent
55d2f80748
commit
38f390c81e
1 changed files with 11 additions and 7 deletions
|
@ -8,6 +8,7 @@ using System.Collections.Generic;
|
||||||
using System.Formats.Tar;
|
using System.Formats.Tar;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Xunit.Abstractions;
|
using Xunit.Abstractions;
|
||||||
|
@ -47,13 +48,8 @@ public static class Utilities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IEnumerable<string> GetTarballContentNames(string tarballPath)
|
public static IEnumerable<string> GetTarballContentNames(string tarballPath) =>
|
||||||
{
|
GetTarballContent(tarballPath).Select(entry => entry.Name);
|
||||||
foreach (var entry in GetTarballContent(tarballPath))
|
|
||||||
{
|
|
||||||
yield return entry.Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IEnumerable<TarEntry> GetTarballContent(string tarballPath)
|
public static IEnumerable<TarEntry> GetTarballContent(string tarballPath)
|
||||||
{
|
{
|
||||||
|
@ -112,4 +108,12 @@ public static class Utilities
|
||||||
exception = await executor();
|
exception = await executor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void LogWarningMessage(this ITestOutputHelper outputHelper, string message)
|
||||||
|
{
|
||||||
|
string prefix = "##vso[task.logissue type=warning;]";
|
||||||
|
|
||||||
|
outputHelper.WriteLine($"{Environment.NewLine}{prefix}{message}.{Environment.NewLine}");
|
||||||
|
outputHelper.WriteLine("##vso[task.complete result=SucceededWithIssues;]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue