public static GetComputeNodeId ( BatchController controller, BatchAccountContext context, string poolId, int index ) : string | ||
controller | BatchController | |
context | BatchAccountContext | |
poolId | string | |
index | int | |
Résultat | string |
private void TestRemoveComputeNode(bool usePipeline, string testMethodName) { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; int originalDedicated = 3; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-RemoveComputeNode '{0}' '{1}' '{2}' '{3}'", accountName, poolId, computeNodeId, usePipeline ? 1 : 0) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName); originalDedicated = ScenarioTestHelpers.GetPoolCurrentDedicated(controller, context, poolId); ScenarioTestHelpers.WaitForSteadyPoolAllocation(controller, context, poolId); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId); }, () => { ScenarioTestHelpers.WaitForSteadyPoolAllocation(controller, context, poolId); ScenarioTestHelpers.ResizePool(controller, context, poolId, originalDedicated); }, TestUtilities.GetCallingClass(), testMethodName); }
public void TestRemoveMultipleComputeNodes() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; string computeNodeId2 = null; int originalDedicated = 3; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-RemoveMultipleComputeNodes '{0}' '{1}' '{2}'", poolId, computeNodeId, computeNodeId2) }); }, () => { context = new ScenarioTestContext(); originalDedicated = ScenarioTestHelpers.GetPoolCurrentDedicated(controller, context, poolId); ScenarioTestHelpers.WaitForSteadyPoolAllocation(controller, context, poolId); ScenarioTestHelpers.ResizePool(controller, context, poolId, originalDedicated + 2); ScenarioTestHelpers.WaitForSteadyPoolAllocation(controller, context, poolId); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId); computeNodeId2 = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId, 1); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId2); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestGetRemoteDesktopProtocolFilePipeline() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-GetRDPFilePipeline '{0}' '{1}'", poolId, computeNodeId) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestGetNodeFileContentByComputeNodeByPipeline() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-GetNodeFileContentByComputeNodePipeline '{0}' '{1}' '{2}' '{3}' '{4}'", accountName, poolId, computeNodeId, startTaskStdOutName, startTaskStdOutContent) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestGetComputeNodeRemoteLoginSettings() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-GetRemoteLoginSettings '{0}' '{1}'", iaasPoolId, computeNodeId) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, iaasPoolId); }, null, MethodBase.GetCurrentMethod().ReflectedType?.ToString(), MethodBase.GetCurrentMethod().Name); }
public void TestGetNodeFileContentByComputeNode() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-GetNodeFileContentByComputeNode '{0}' '{1}' '{2}' '{3}'", poolId, computeNodeId, startTaskStdOutName, startTaskStdOutContent) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, MethodBase.GetCurrentMethod().ReflectedType?.ToString(), MethodBase.GetCurrentMethod().Name); }
private void TestGetComputeNodeRemoteLoginSettings(bool usePipeline, string testMethodName) { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-GetRemoteLoginSettings '{0}' '{1}' '{2}'", iaasPoolId, computeNodeId, usePipeline ? 1 : 0) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, iaasPoolId); }, null, TestUtilities.GetCallingClass(), testMethodName); }
public void TestGetAndListComputeNodesWithSelect() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-GetAndListComputeNodesWithSelect '{0}' '{1}' '{2}'", accountName, poolId, computeNodeId) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestDisableAndEnableComputeNodeScheduling() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-DisableAndEnableComputeNodeScheduling '{0}' '{1}'", poolId, computeNodeId) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
private void TestReimageComputeNode(bool usePipeline) { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-ReimageComputeNode '{0}' '{1}' '{2}' '{3}'", accountName, poolId, computeNodeId, usePipeline ? 1 : 0) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId); }, null, TestUtilities.GetCallingClass(), usePipeline ? "TestReimageComputeNodePipeline" : "TestReimageComputeNodeById"); }
public void TestListNodeFileByComputeNodePipeline() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; int count = 4; // shared, startup, workitems, applications controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-ListNodeFileByComputeNodePipeline '{0}' '{1}' '{2}'", poolId, computeNodeId, count) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestListNodeFilesByComputeNodeWithMaxCount() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; int maxCount = 1; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-ListNodeFilesByComputeNodeWithMaxCount '{0}' '{1}' '{2}'", poolId, computeNodeId, maxCount) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestGetNodeFileByComputeNodeByName() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; string nodeFileName = "startup\\stdout.txt"; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-GetNodeFileByComputeNodeByName '{0}' '{1}' '{2}'", poolId, computeNodeId, nodeFileName) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestCreateComputeNodeUserPipeline() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; string userName = "******"; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-CreateComputeNodeUser '{0}' '{1}' '{2}' 1", poolId, computeNodeId, userName) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
private void TestDisableAndEnableComputeNodeScheduling(bool usePipeline, string testMethodName) { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-DisableAndEnableComputeNodeScheduling '{0}' '{1}' '{2}' '{3}'", ScenarioTestHelpers.MpiOnlineAccount, poolId, computeNodeId, usePipeline ? 1 : 0) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, ScenarioTestHelpers.MpiOnlineAccount); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId); }, null, TestUtilities.GetCallingClass(), testMethodName); }
public void TestComputeNodeUserEndToEnd() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; controller.RunPsTestWorkflow( _logger, () => { return(new string[] { string.Format("Test-ComputeNodeUserEndToEnd '{0}' '{1}'", poolId, computeNodeId) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, MethodBase.GetCurrentMethod().ReflectedType?.ToString(), MethodBase.GetCurrentMethod().Name); }
public void TestListAllNodeFilesByComputeNode() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; int count = 3; // shared, startup, workitems controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-ListAllNodeFilesByComputeNode '{0}' '{1}' '{2}' '{3}'", accountName, poolId, computeNodeId, count) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestDeleteComputeNodeUser() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; string userName = "******"; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-DeleteComputeNodeUser '{0}' '{1}' '{2}' '{3}'", accountName, poolId, computeNodeId, userName) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); ScenarioTestHelpers.CreateComputeNodeUser(controller, context, poolId, computeNodeId, userName); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestListNodeFilesByComputeNodeRecursive() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; string startupFolder = "startup"; int recursiveCount = 5;// dir itself, ProcessEnv, stdout, stderr, wd controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-ListNodeFilesByComputeNodeRecursive '{0}' '{1}' '{2}' '{3}' '{4}'", accountName, poolId, computeNodeId, startupFolder, recursiveCount) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestListNodeFilesByComputeNodeByFilter() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; string nodeFilePrefix = "s"; int matches = 2; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-ListNodeFilesByComputeNodeByFilter '{0}' '{1}' '{2}' '{3}' '{4}'", accountName, poolId, computeNodeId, nodeFilePrefix, matches) }); }, () => { context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId); }, null, TestUtilities.GetCallingClass(), TestUtilities.GetCurrentMethodName()); }
public void TestRebootAndReimageComputeNode() { BatchController controller = BatchController.NewInstance; BatchAccountContext context = null; string computeNodeId = null; string computeNodeId2 = null; controller.RunPsTestWorkflow( () => { return(new string[] { string.Format("Test-RebootAndReimageComputeNode '{0}' '{1}' '{2}'", poolId, computeNodeId, computeNodeId2) }); }, () => { context = new ScenarioTestContext(); computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId, 0); computeNodeId2 = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId, 1); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId); ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId2); }, null, MethodBase.GetCurrentMethod().ReflectedType?.ToString(), MethodBase.GetCurrentMethod().Name); }