Skip to content

Commit 082fea3

Browse files
committed
add listWithField test
1 parent 2fe7f34 commit 082fea3

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Copyright (2020, ) Institute of Software, Chinese Academy of Sciences
3+
*/
4+
package io.github.kubesys.client.testcases;
5+
6+
import java.util.HashMap;
7+
import java.util.Map;
8+
9+
import com.fasterxml.jackson.databind.JsonNode;
10+
11+
import io.github.kubesys.client.AbstractKubernetesClientTest;
12+
import io.github.kubesys.client.KubernetesClient;
13+
14+
/**
15+
* @author wuheng09@gmail.com
16+
*
17+
*/
18+
public class ListPodsWithFieldTest extends AbstractKubernetesClientTest {
19+
20+
21+
/**
22+
* see command `kubectl api-resources`
23+
*
24+
* @param args
25+
* @throws Exception
26+
*/
27+
public static void main(String[] args) throws Exception {
28+
KubernetesClient client = createClient1(null);
29+
Map<String, String> map= new HashMap<>();
30+
map.put("spec.schedulerName", "default-scheduler");
31+
// Just kind
32+
JsonNode listResourcesWithField = client.listResourcesWithField("Pod", map);
33+
System.out.println(listResourcesWithField.toPrettyString());
34+
}
35+
36+
}

0 commit comments

Comments
 (0)