use of org.csanchez.jenkins.plugins.kubernetes.PodTemplateBuilder in project kubernetes-plugin by jenkinsci.
the class PodTemplateBuilderTest method defaultRequests.
@Test
public void defaultRequests() throws Exception {
PodTemplate template = new PodTemplate();
Pod pod = new PodTemplateBuilder(template, slave).build();
ResourceRequirements resources = pod.getSpec().getContainers().get(0).getResources();
assertNotNull(resources);
Map<String, Quantity> requests = resources.getRequests();
assertNotNull(requests);
PodTemplateUtilsTest.assertQuantity(PodTemplateBuilder.DEFAULT_JNLP_CONTAINER_CPU_REQUEST, requests.get("cpu"));
PodTemplateUtilsTest.assertQuantity(PodTemplateBuilder.DEFAULT_JNLP_CONTAINER_MEMORY_REQUEST, requests.get("memory"));
}
Aggregations