@Test public void shouldFailIfVaultSecretIsInvalid() throws ClusterProxyException { assertThrows(VaultConfigException.class, () -> service.registerCluster(testStackWithInvalidSecret())); verify(clusterProxyRegistrationClient, times(0)).registerConfig(any()); }
public ConfigRegistrationResponse registerCluster(Stack stack) { ConfigRegistrationRequest proxyConfigRequest = createProxyConfigRequest(stack); ConfigRegistrationResponse configRegistrationResponse = clusterProxyRegistrationClient.registerConfig(proxyConfigRequest); stackUpdater.updateClusterProxyRegisteredFlag(stack, true); return configRegistrationResponse; }
ClusterProxyService { public ConfigRegistrationResponse registerCluster(Stack stack) { ConfigRegistrationRequest proxyConfigRequest = createProxyConfigRequest(stack); ConfigRegistrationResponse configRegistrationResponse = clusterProxyRegistrationClient.registerConfig(proxyConfigRequest); stackUpdater.updateClusterProxyRegisteredFlag(stack, true); return configRegistrationResponse; } }
ClusterProxyService { public ConfigRegistrationResponse registerCluster(Stack stack) { ConfigRegistrationRequest proxyConfigRequest = createProxyConfigRequest(stack); ConfigRegistrationResponse configRegistrationResponse = clusterProxyRegistrationClient.registerConfig(proxyConfigRequest); stackUpdater.updateClusterProxyRegisteredFlag(stack, true); return configRegistrationResponse; }  }
ClusterProxyService { public ConfigRegistrationResponse registerCluster(Stack stack) { ConfigRegistrationRequest proxyConfigRequest = createProxyConfigRequest(stack); ConfigRegistrationResponse configRegistrationResponse = clusterProxyRegistrationClient.registerConfig(proxyConfigRequest); stackUpdater.updateClusterProxyRegisteredFlag(stack, true); return configRegistrationResponse; }  ConfigRegistrationResponse registerCluster(Stack stack); ConfigRegistrationResponse reRegisterCluster(Stack stack); void registerGatewayConfiguration(Long stackId); boolean useClusterProxyForCommunication(Tunnel tunnel, String cloudPlatform); boolean useClusterProxyForCommunication(Stack stack); boolean isCreateConfigForClusterProxy(Stack stack); void deregisterCluster(Stack stack); String getProxyPath(String crn); com.sequenceiq.cloudbreak.api.endpoint.v4.autoscales.response.ClusterProxyConfiguration getClusterProxyConfigurationForAutoscale(); }
ClusterProxyService { public ConfigRegistrationResponse registerCluster(Stack stack) { ConfigRegistrationRequest proxyConfigRequest = createProxyConfigRequest(stack); ConfigRegistrationResponse configRegistrationResponse = clusterProxyRegistrationClient.registerConfig(proxyConfigRequest); stackUpdater.updateClusterProxyRegisteredFlag(stack, true); return configRegistrationResponse; }  ConfigRegistrationResponse registerCluster(Stack stack); ConfigRegistrationResponse reRegisterCluster(Stack stack); void registerGatewayConfiguration(Long stackId); boolean useClusterProxyForCommunication(Tunnel tunnel, String cloudPlatform); boolean useClusterProxyForCommunication(Stack stack); boolean isCreateConfigForClusterProxy(Stack stack); void deregisterCluster(Stack stack); String getProxyPath(String crn); com.sequenceiq.cloudbreak.api.endpoint.v4.autoscales.response.ClusterProxyConfiguration getClusterProxyConfigurationForAutoscale(); static final String CB_INTERNAL; }