@Test void testRenewCertificateWhenCertGenerationFeatureIsEnabledButClusterDoesNotHaveUserFacingCert() { Stack stack = TestUtil.stack(); boolean result = underTest.renewCertificate(stack); verify(environmentClientService, Mockito.times(0)).getByCrn(Mockito.anyString()); Assertions.assertEquals(Boolean.TRUE, result); }
public boolean renewCertificate(Stack stack) { boolean result = true; if (isCertRenewalTriggerable(stack)) { LOGGER.info("Renew certificate for stack: '{}'", stack.getName()); result = generateCertAndSaveForStack(stack); if (StringUtils.isEmpty(stack.getCluster().getFqdn())) { LOGGER.info("The cluster doesn't have public DNS entry, starting to create one."); updateDnsEntryForCluster(stack); } } return result; }
GatewayPublicEndpointManagementService extends BasePublicEndpointManagementService { public boolean renewCertificate(Stack stack) { boolean result = true; if (isCertRenewalTriggerable(stack)) { LOGGER.info("Renew certificate for stack: '{}'", stack.getName()); result = generateCertAndSaveForStack(stack); if (StringUtils.isEmpty(stack.getCluster().getFqdn())) { LOGGER.info("The cluster doesn't have public DNS entry, starting to create one."); updateDnsEntryForCluster(stack); } } return result; } }
GatewayPublicEndpointManagementService extends BasePublicEndpointManagementService { public boolean renewCertificate(Stack stack) { boolean result = true; if (isCertRenewalTriggerable(stack)) { LOGGER.info("Renew certificate for stack: '{}'", stack.getName()); result = generateCertAndSaveForStack(stack); if (StringUtils.isEmpty(stack.getCluster().getFqdn())) { LOGGER.info("The cluster doesn't have public DNS entry, starting to create one."); updateDnsEntryForCluster(stack); } } return result; }  }
GatewayPublicEndpointManagementService extends BasePublicEndpointManagementService { public boolean renewCertificate(Stack stack) { boolean result = true; if (isCertRenewalTriggerable(stack)) { LOGGER.info("Renew certificate for stack: '{}'", stack.getName()); result = generateCertAndSaveForStack(stack); if (StringUtils.isEmpty(stack.getCluster().getFqdn())) { LOGGER.info("The cluster doesn't have public DNS entry, starting to create one."); updateDnsEntryForCluster(stack); } } return result; }  boolean isCertRenewalTriggerable(Stack stack); boolean generateCertAndSaveForStackAndUpdateDnsEntry(Stack stack); String updateDnsEntry(Stack stack, String gatewayIp); String deleteDnsEntry(Stack stack, String environmentName); boolean renewCertificate(Stack stack); }
GatewayPublicEndpointManagementService extends BasePublicEndpointManagementService { public boolean renewCertificate(Stack stack) { boolean result = true; if (isCertRenewalTriggerable(stack)) { LOGGER.info("Renew certificate for stack: '{}'", stack.getName()); result = generateCertAndSaveForStack(stack); if (StringUtils.isEmpty(stack.getCluster().getFqdn())) { LOGGER.info("The cluster doesn't have public DNS entry, starting to create one."); updateDnsEntryForCluster(stack); } } return result; }  boolean isCertRenewalTriggerable(Stack stack); boolean generateCertAndSaveForStackAndUpdateDnsEntry(Stack stack); String updateDnsEntry(Stack stack, String gatewayIp); String deleteDnsEntry(Stack stack, String environmentName); boolean renewCertificate(Stack stack);  }