public async Task CopyFileStepsPathResolutionTestAsync()
        {
            var a = new ActionProfileOptions {
                Name = "A"
            };

            var envLinux = new ActionEvaluationEnvironment(@"C:\Local", "/remote", false, new CapabilityInfo(default, ServerPlatform.Linux, default), new[] { a });
Beispiel #2
0
 public ActionCompletedEventArgs(Error?error, ActionProfileOptions action, MacroEvaluatorTransientValues transients, ActionRunResult runResult = null)
 {
     Error      = error;
     Action     = action;
     Transients = transients;
     RunResult  = runResult;
 }
Beispiel #3
0
        public async Task NestedRunResultLoggingTestAsync()
        {
            var actions = new ActionProfileOptions[3];

            actions[0] = new ActionProfileOptions {
                Name = "Exchange Soul"
            };
            actions[0].Steps.Add(new ExecuteStep {
                Environment = StepEnvironment.Remote, Executable = "cleanup", Arguments = "--skip"
            });
            actions[1] = new ActionProfileOptions {
                Name = "Sign Contract"
            };
            actions[1].Steps.Add(new ExecuteStep {
                Environment = StepEnvironment.Remote, Executable = "obtain-contract", Arguments = "-i -mm"
            });
            actions[1].Steps.Add(new RunActionStep {
                Name = "Exchange Soul"
            });
            actions[2] = new ActionProfileOptions {
                Name = "Transform"
            };
            actions[2].Steps.Add(new RunActionStep {
                Name = "Sign Contract"
            });
            actions[2].Steps.Add(new CopyFileStep {
                Direction = FileCopyDirection.LocalToRemote, FailIfNotModified = true, TargetPath = "incubator", SourcePath = "soul"
            });

            var evaluator = new Mock <IMacroEvaluator>();

            evaluator.Setup(e => e.EvaluateAsync(It.IsAny <string>())).Returns <string>(s => Task.FromResult <Result <string> >(s));

            var env = new ActionEvaluationEnvironment("", "", false, new DebugServer.IPC.CapabilityInfo(default, default, default), actions);