Search in sources :

Example 1 with NamespacedOpenShiftClient

use of io.fabric8.openshift.client.NamespacedOpenShiftClient in project syndesis by syndesisio.

the class PrometheusMetricsProviderImplTest method setUp.

@Before
public void setUp() {
    final PrometheusConfigurationProperties config = new PrometheusConfigurationProperties();
    config.setService("syndesis-prometheus-syndesis.192.168.64.22.nip.io");
    NamespacedOpenShiftClient openshiftClient = mock(NamespacedOpenShiftClient.class);
    when(openshiftClient.pods().withName("syndesis-server").get().getStatus().getStartTime()).thenReturn("2018-03-14T23:34:09Z");
    metricsProvider = new PrometheusMetricsProviderImpl(config, openshiftClient);
}
Also used : NamespacedOpenShiftClient(io.fabric8.openshift.client.NamespacedOpenShiftClient) Before(org.junit.Before)

Aggregations

NamespacedOpenShiftClient (io.fabric8.openshift.client.NamespacedOpenShiftClient)1 Before (org.junit.Before)1