Package com.dtolabs.rundeck.core.common

Examples of com.dtolabs.rundeck.core.common.NodeEntryImpl


        };
    }

    public void testEventsBeginWorkflowExecution() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        nodes.put("test1", new NodeEntryImpl("test1"));
        NodeSetImpl nodeSet = new NodeSetImpl(nodes);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(nodeSet).build(), null);

        assertEquals(1, testListener1.events.size());
        Object[] o = (Object[]) testListener1.events.get(0);
View Full Code Here


        assertWorkflowStateEvent(o, ExecutionState.RUNNING, "test1");
    }

    public void testEventsFinishWorkflowExecution() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        nodes.put("test1", new NodeEntryImpl("test1"));
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);
        test.finishWorkflowExecution(wfresult.forSuccess(true), ExecutionContextImpl.builder().nodes(new NodeSetImpl
                (nodes)).build(), null);

        assertEquals(2, testListener1.events.size());
View Full Code Here

        assertWorkflowStateEvent(o2, ExecutionState.SUCCEEDED);
    }

    public void testFinishExecuteNodeStepNullResult() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        NodeEntryImpl node1 = new NodeEntryImpl("test1");
        nodes.put("test1", node1);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);
        test.beginExecuteNodeStep(null, null, node1);
View Full Code Here

        assertStepStateEvent((Object[]) testListener1.events.get(3), ExecutionState.FAILED, "test1", null,
                reason1.map(), 1);
    }
    public void testEventsBeginWorkflowItem() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        nodes.put("test1", new NodeEntryImpl("test1"));
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);

        assertEquals(2, testListener1.events.size());
View Full Code Here

        Object[] o2 = (Object[]) testListener1.events.get(1);
        assertStepStateEvent(o2, ExecutionState.RUNNING, null,1);
    }
    public void testEventsFinishWorkflowItem() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        nodes.put("test1", new NodeEntryImpl("test1"));
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);
        test.finishWorkflowItem(1, testitem, successResult());
View Full Code Here

        }
    }

    public void testEventsWorkflowItemErrorHandler() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        NodeEntryImpl node1 = new NodeEntryImpl("test1");
        nodes.put("test1", node1);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);
        test.beginExecuteNodeStep(null, null, node1);
View Full Code Here

        assertStepStateEvent((Object[]) testListener1.events.get(7), ExecutionState.SUCCEEDED, null, null, null, StateUtils.stepContextId(1, true));
    }

    public void testEventsSubflowWithErrorHandler() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        NodeEntryImpl node1 = new NodeEntryImpl("test1");
        nodes.put("test1", node1);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);
        test.beginWorkflowItem(1, testitem);
        //sub workflow
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);
View Full Code Here

        return new NodeStepResultImpl(null, failureReason, message, node1);
    }

    public void testEventsBeginSubStepItem() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        NodeEntryImpl node1 = new NodeEntryImpl("test1");
        nodes.put("test1", node1);
        HashMap<String, INodeEntry> nodes2 = new HashMap<String, INodeEntry>();
        NodeEntryImpl node2 = new NodeEntryImpl("test2");
        nodes2.put("test2", node2);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);
        //sub workflow
View Full Code Here

        assertSubWorkflowStateEvent((Object[]) testListener1.events.get(2), ExecutionState.RUNNING, new int[]{1}, "test2");
        assertStepStateEvent((Object[]) testListener1.events.get(3), ExecutionState.RUNNING, null, 1, 1);
    }
    public void testEventsFinishSubStepItem() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        NodeEntryImpl node1 = new NodeEntryImpl("test1");
        nodes.put("test1", node1);
        HashMap<String, INodeEntry> nodes2 = new HashMap<String, INodeEntry>();
        NodeEntryImpl node2 = new NodeEntryImpl("test2");
        nodes2.put("test2", node2);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);
        //sub workflow
View Full Code Here

        assertStepStateEvent((Object[]) testListener1.events.get(3), ExecutionState.RUNNING, null, 1, 1);
        assertStepStateEvent((Object[]) testListener1.events.get(4), ExecutionState.SUCCEEDED, null, 1, 1);
    }
    public void testEventsFinishSubFlow() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        NodeEntryImpl node1 = new NodeEntryImpl("test1");
        nodes.put("test1", node1);
        HashMap<String, INodeEntry> nodes2 = new HashMap<String, INodeEntry>();
        NodeEntryImpl node2 = new NodeEntryImpl("test2");
        nodes2.put("test2", node2);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);
        //sub workflow
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.common.NodeEntryImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.