CertificateProvisioner implements ConfigurationProvisioner<KubernetesEnvironment> { public boolean isConfigured() { return !isNullOrEmpty(certificate); } CertificateProvisioner(); @VisibleForTesting  CertificateProvisioner(String certificate); boolean isConfigured(); String getCertPath(); @Override void provision(KubernetesEnvironment k8sEnv, RuntimeIdentity identity); static final String CHE_SELF_SIGNED_CERT_SECRET_SUFFIX; static final String CHE_SELF_SIGNED_CERT_VOLUME; static final String CERT_MOUNT_PATH; static final String CA_CERT_FILE; }
@Test public void shouldReturnFalseIfCertificateIsNotSpecifiedOnIsConfiguredInvoking() { provisioner = new CertificateProvisioner(""); boolean configured = provisioner.isConfigured(); assertFalse(configured); }
@Test public void shouldReturnTrueIfCertificateIsSpecifiedOnIsConfiguredInvoking() { provisioner = new CertificateProvisioner(CERT_CONTENT); boolean configured = provisioner.isConfigured(); assertTrue(configured); }