コード例 #1
0
        public void GivenRunningAgent()
        {
            CopyAgentToCleanRunFolder();
            CopyConfigToAgentDir();

            NodeFront = new NodeFrontSimulator();
            NodeFront.Start();

            AgentProcess = new Process();
            AgentProcess.StartInfo.UseShellExecute = false;
            AgentProcess.StartInfo.WorkingDirectory = AgentDir;
            AgentProcess.StartInfo.FileName = Path.Combine(AgentDir, "AsimovDeploy.WinAgent.exe");
            AgentProcess.StartInfo.CreateNoWindow = true;
            AgentProcess.StartInfo.RedirectStandardError = true;
            AgentProcess.StartInfo.RedirectStandardOutput = true;
            AgentProcess.Start();

            RedirectAgentOutputToDebug(AgentProcess.StandardOutput);

            Thread.Sleep(5000);

            Agent = new AgentHttpClient(AgentPort);

            Assert.NotNull(Agent.Get("/version"));
        }
コード例 #2
0
        public void GivenRunningAgent()
        {
            CopyAgentToCleanRunFolder();
            CopyConfigToAgentDir();

            NodeFront = new NodeFrontSimulator();
            NodeFront.Start();

            AgentProcess = new Process();
            AgentProcess.StartInfo.UseShellExecute = false;
            AgentProcess.StartInfo.WorkingDirectory = AgentDir;
            AgentProcess.StartInfo.FileName = Path.Combine(AgentDir, "AsimovDeploy.WinAgent.exe");
            AgentProcess.StartInfo.CreateNoWindow = true;
            AgentProcess.StartInfo.RedirectStandardError = true;
            AgentProcess.StartInfo.RedirectStandardOutput = true;
            AgentProcess.Start();

            RedirectAgentOutputToDebug(AgentProcess.StandardOutput);

            Thread.Sleep(5000);

            Agent = new AgentHttpClient(AgentPort);

            Assert.NotNull(Agent.Get("/version"));
        }