Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute Action - Testing #742

Prev Previous commit
Small tweak for Justin.
  • Loading branch information
kkeirstead committed Aug 20, 2021
commit 21ad5644321142530ff118f46bdd8f13a9ee5960
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
using System.IO;
using System.Diagnostics;
using Microsoft.Diagnostics.Tools.Monitor;
using System.Collections.Generic;

namespace Microsoft.Diagnostics.Monitoring.Tool.UnitTests
{
@@ -153,8 +154,15 @@ private static string GenerateArgumentsString(string[] additionalArgs)
{
Assembly currAssembly = Assembly.GetExecutingAssembly();

return AssemblyHelper.GetAssemblyArtifactBinPath(currAssembly, "Microsoft.Diagnostics.Monitoring.ExecuteActionApp", TargetFrameworkMoniker.NetCoreApp31)
+ ' ' + string.Join(' ', additionalArgs);
List<string> args = new();

// Entrypoint assembly
args.Add(AssemblyHelper.GetAssemblyArtifactBinPath(currAssembly, "Microsoft.Diagnostics.Monitoring.ExecuteActionApp", TargetFrameworkMoniker.NetCoreApp31));

// Entrypoint arguments
args.AddRange(additionalArgs);

return string.Join(' ', args);
}

private static void ValidateActionResult(CollectionRuleActionResult result, string expectedExitCode)