Search in sources :

Example 1 with ParallelOrchestratorComponentRunner

use of com.sequenceiq.cloudbreak.orchestrator.executor.ParallelOrchestratorComponentRunner in project cloudbreak by hortonworks.

the class SaltOrchestratorTest method setUp.

@Before
public void setUp() throws Exception {
    gatewayConfig = new GatewayConfig("1.1.1.1", "10.0.0.1", "172.16.252.43", "10-0-0-1", 9443, "servercert", "clientcert", "clientkey", "saltpasswd", "saltbootpassword", "signkey", false, true, null, null);
    targets = new HashSet<>();
    targets.add(new Node("10.0.0.1", "1.1.1.1", "10-0-0-1.example.com", "hg"));
    targets.add(new Node("10.0.0.2", "1.1.1.2", "10-0-0-2.example.com", "hg"));
    targets.add(new Node("10.0.0.3", "1.1.1.3", "10-0-0-3.example.com", "hg"));
    saltConnector = mock(SaltConnector.class);
    whenNew(SaltConnector.class).withAnyArguments().thenReturn(saltConnector);
    parallelOrchestratorComponentRunner = mock(ParallelOrchestratorComponentRunner.class);
    when(parallelOrchestratorComponentRunner.submit(any())).thenReturn(CompletableFuture.completedFuture(true));
    when(hostDiscoveryService.determineDomain("test", "test", false)).thenReturn(".example.com");
    exitCriteria = mock(ExitCriteria.class);
    exitCriteriaModel = mock(ExitCriteriaModel.class);
}
Also used : ExitCriteriaModel(com.sequenceiq.cloudbreak.orchestrator.state.ExitCriteriaModel) ParallelOrchestratorComponentRunner(com.sequenceiq.cloudbreak.orchestrator.executor.ParallelOrchestratorComponentRunner) ExitCriteria(com.sequenceiq.cloudbreak.orchestrator.state.ExitCriteria) Node(com.sequenceiq.cloudbreak.orchestrator.model.Node) SaltConnector(com.sequenceiq.cloudbreak.orchestrator.salt.client.SaltConnector) GatewayConfig(com.sequenceiq.cloudbreak.orchestrator.model.GatewayConfig) Before(org.junit.Before)

Aggregations

ParallelOrchestratorComponentRunner (com.sequenceiq.cloudbreak.orchestrator.executor.ParallelOrchestratorComponentRunner)1 GatewayConfig (com.sequenceiq.cloudbreak.orchestrator.model.GatewayConfig)1 Node (com.sequenceiq.cloudbreak.orchestrator.model.Node)1 SaltConnector (com.sequenceiq.cloudbreak.orchestrator.salt.client.SaltConnector)1 ExitCriteria (com.sequenceiq.cloudbreak.orchestrator.state.ExitCriteria)1 ExitCriteriaModel (com.sequenceiq.cloudbreak.orchestrator.state.ExitCriteriaModel)1 Before (org.junit.Before)1