Skip to content
Snippets Groups Projects
Commit 87c7c345 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4906 use correct namespace

parent 3f674b27
Branches
No related tags found
No related merge requests found
......@@ -32,10 +32,10 @@ public class OzgCloudElasticsearchService {
public void copyElasticCertificate(String namespace) {
try {
LOG.debug("Copy elasticseaerch ssl certificate from namespace: {}" , properties.getServer().getCertificateNamespace());
LOG.debug("Copy elasticseaerch ssl certificate from namespace: {}" , properties.getServer().getNamespace());
LOG.debug("Copy elasticseaerch ssl certificate secret: {}" , properties.getServer().getCertificateSecretName());
var secretResource = kubernetesService.getSecretResource(properties.getServer().getCertificateNamespace(), properties.getServer().getCertificateSecretName());
var secretResource = kubernetesService.getSecretResource(properties.getServer().getNamespace(), properties.getServer().getCertificateSecretName());
LOG.info("{}: Create certificate secret", namespace);
createCredentialSecret(secretResource,namespace);
} catch (ElasticsearchException e) {
......
......@@ -122,7 +122,6 @@ class OzgCloudElasticsearchServiceTest {
@Test
void shouldCheckIfIndexExists() {
when(kubernetesService.getSecretResource(any(), any())).thenReturn(secretResource);
when(serverProperties.getCertificateNamespace()).thenReturn(NAMESPACE);
when(properties.getServer()).thenReturn(serverProperties);
service.createIndexIfMissing(NAMESPACE);
......@@ -134,8 +133,6 @@ class OzgCloudElasticsearchServiceTest {
@Test
void shouldCreateIndexIfMissing() {
when(kubernetesService.getSecretResource(any(), any())).thenReturn(secretResource);
when(serverProperties.getCertificateNamespace()).thenReturn(NAMESPACE);
when(remoteService.existsIndex(any())).thenReturn(false);
when(properties.getServer()).thenReturn(serverProperties);
service.createIndexIfMissing(NAMESPACE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment