components/global/core/io.cellery.observability.k8s.client/src/test/java/io/cellery/observability/k8s/client/GetComponentPodsStreamProcessorTestCase.java
private void expectGetPods(String labelSelector, Pod... returnPods) throws Exception {
        String path = "/api/v1/namespaces/" + URLEncoder.encode(Constants.NAMESPACE, StandardCharsets.UTF_8.toString())
                + "/pods?labelSelector=" + URLEncoder.encode(labelSelector, StandardCharsets.UTF_8.toString())
                + "&fieldSelector=" + URLEncoder.encode(Constants.STATUS_FIELD + "="
                + Constants.STATUS_FIELD_RUNNING_VALUE, StandardCharsets.UTF_8.toString());
        k8sServer.expect()
                .withPath(path)
                .andReturn(200, new PodListBuilder().addToItems(returnPods).build())
                .once();
    }
/**
     * Expect a get pods call to Mock K8s Server.
     *
     * @param labelSelector The label selector of the API call
     * @param returnPods The pods to be returned
     */
Expect a get pods call to Mock K8s Server.
@param labelSelector The label selector of the API call
@param returnPods The pods to be returned
Expect a get pods call to Mock K8s Server . @param labelSelector The label selector of the API call @param returnPods The pods to be returned
private void expectGetPods(String labelSelector, Pod... returnPods) throws Exception {
        String path = "/api/v1/namespaces/" + URLEncoder.encode(Constants.NAMESPACE, StandardCharsets.UTF_8.toString())
                + "/pods?labelSelector=" + URLEncoder.encode(labelSelector, StandardCharsets.UTF_8.toString())
                + "&fieldSelector=" + URLEncoder.encode(Constants.STATUS_FIELD + "="
                + Constants.STATUS_FIELD_RUNNING_VALUE, StandardCharsets.UTF_8.toString());
        k8sServer.expect()
                .withPath(path)
                .andReturn(200, new PodListBuilder().addToItems(returnPods).build())
                .once();
    }
private void expectGetPods ( String labelSelector , Pod ... returnPods ) throws Exception { String path = "/api/v1/namespaces/" + URLEncoder . encode ( Constants . NAMESPACE , StandardCharsets . UTF_8 . toString ( ) ) + "/pods?labelSelector=" + URLEncoder . encode ( labelSelector , StandardCharsets . UTF_8 . toString ( ) ) + "&fieldSelector=" + URLEncoder . encode ( Constants . STATUS_FIELD + "=" + Constants . STATUS_FIELD_RUNNING_VALUE , StandardCharsets . UTF_8 . toString ( ) ) ; k8sServer . expect ( ) . withPath ( path ) . andReturn ( 200 , new PodListBuilder ( ) . addToItems ( returnPods ) . build ( ) ) . once ( ) ; }
Expect a get pods call to Mock K8s Server.
Expect a get pods call to Mock K8s Server .