Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Fix detect enmasse installed
Browse files Browse the repository at this point in the history
  • Loading branch information
kornys committed Jun 29, 2020
1 parent 2eb0a65 commit 2e5a210
Showing 1 changed file with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@
*/
package io.enmasse.systemtest.operator;

import static org.junit.jupiter.api.Assertions.assertTrue;
import static io.enmasse.systemtest.condition.OpenShiftVersion.OCP4;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.stream.Collectors;

import org.slf4j.Logger;

import io.enmasse.admin.model.v1.ConsoleService;
import io.enmasse.admin.model.v1.ConsoleServiceSpec;
import io.enmasse.systemtest.Environment;
Expand All @@ -33,8 +17,23 @@
import io.enmasse.systemtest.platform.OpenShift;
import io.enmasse.systemtest.time.TimeoutBudget;
import io.enmasse.systemtest.utils.TestUtils;
import io.fabric8.kubernetes.api.model.EnvVar;
import io.fabric8.kubernetes.api.model.ConfigMapBuilder;
import io.fabric8.kubernetes.api.model.EnvVar;
import org.slf4j.Logger;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.stream.Collectors;

import static io.enmasse.systemtest.condition.OpenShiftVersion.OCP4;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class EnmasseOperatorManager {

Expand Down Expand Up @@ -427,8 +426,7 @@ private void awaitConsoleReadiness(String namespace) throws Exception {

public boolean isEnmasseBundleDeployed() {
return kube.namespaceExists(kube.getInfraNamespace())
&& kube.listPods(kube.getInfraNamespace()).stream().filter(pod -> pod.getMetadata().getName().contains("enmasse-operator")).count() == 1
&& kube.listPods(kube.getInfraNamespace()).stream().filter(pod -> pod.getMetadata().getName().contains("address-space-controller")).count() == 1;
&& kube.listPods(kube.getInfraNamespace()).stream().filter(pod -> pod.getMetadata().getName().contains("enmasse-operator")).count() == 1;
}

public boolean isEnmasseOlmDeployed() {
Expand Down

0 comments on commit 2e5a210

Please sign in to comment.