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")));
}
Aggregations