コード例 #1
0
  @Test
  public void registratorStartInClusterWhenEverythingWorksFine() throws Exception {
    when(registratorBootstrap.call()).thenReturn(true);
    doReturn(registratorBootstrap)
        .when(underTestSpy)
        .registratorBootstrap(any(GatewayConfig.class), anyString(), any(Node.class));

    underTestSpy.startRegistrator(
        containerOrchestratorCluster(gatewayConfig(), generateNodes(FIX_NODE_COUNT)),
        new ContainerConfig("registrator", "0.0.1"),
        exitCriteriaModel());
  }
コード例 #2
0
  @Test(expected = CloudbreakOrchestratorFailedException.class)
  public void registratorStartInClusterWhenNullPointerOccurredAndOrchestratorFailedComes()
      throws Exception {
    when(registratorBootstrap.call()).thenThrow(new NullPointerException("null"));
    doReturn(registratorBootstrap)
        .when(underTestSpy)
        .registratorBootstrap(any(GatewayConfig.class), anyString(), any(Node.class));

    underTestSpy.startRegistrator(
        containerOrchestratorCluster(gatewayConfig(), generateNodes(FIX_NODE_COUNT)),
        new ContainerConfig("registrator", "0.0.1"),
        exitCriteriaModel());
  }
コード例 #3
0
  @Test
  public void kerberosServerStartInClusterWhenNullPointerOccurredAndOrchestratorFailedComes()
      throws Exception {
    when(registratorBootstrap.call()).thenThrow(new NullPointerException("null"));
    doReturn(kerberosServerBootstrap)
        .when(underTestSpy)
        .kerberosServerBootstrap(
            any(KerberosConfiguration.class),
            any(GatewayConfig.class),
            anyString(),
            any(Node.class),
            any(LogVolumePath.class));

    underTestSpy.startKerberosServer(
        containerOrchestratorCluster(gatewayConfig(), generateNodes(FIX_NODE_COUNT)),
        new ContainerConfig("bserver", "0.0.1"),
        generateLogVolume(),
        new KerberosConfiguration("", "", ""),
        exitCriteriaModel());
  }