Search in sources :

Example 1 with ListOptions

use of io.kubernetes.client.util.generic.options.ListOptions in project java by kubernetes-client.

the class GenericKubernetesApiTest method watchNamespacedJobReturningObject.

@Test
public void watchNamespacedJobReturningObject() throws ApiException {
    V1JobList jobList = new V1JobList().kind("JobList").metadata(new V1ListMeta());
    stubFor(get(urlPathEqualTo("/apis/batch/v1/namespaces/default/jobs")).willReturn(aResponse().withStatus(200).withBody(json.serialize(jobList))));
    Watchable<V1Job> jobListWatch = jobClient.watch("default", new ListOptions());
    verify(1, getRequestedFor(urlPathEqualTo("/apis/batch/v1/namespaces/default/jobs")).withQueryParam("watch", equalTo("true")));
}
Also used : V1Job(io.kubernetes.client.openapi.models.V1Job) V1JobList(io.kubernetes.client.openapi.models.V1JobList) ListOptions(io.kubernetes.client.util.generic.options.ListOptions) V1ListMeta(io.kubernetes.client.openapi.models.V1ListMeta) Test(org.junit.Test)

Aggregations

V1Job (io.kubernetes.client.openapi.models.V1Job)1 V1JobList (io.kubernetes.client.openapi.models.V1JobList)1 V1ListMeta (io.kubernetes.client.openapi.models.V1ListMeta)1 ListOptions (io.kubernetes.client.util.generic.options.ListOptions)1 Test (org.junit.Test)1