You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 10, 2024. It is now read-only.
It runs the API Server binaries directly (without nodes and other components). Thus, only etcd and Kubernetes API Server.
7
+
6
8
Project is in early phases, heading towards mvp release.
7
9
8
10
## Usage
9
11
12
+
### Unit Tests
13
+
14
+
See sample unit test [here](https://github.com/csviri/jenvtest/blob/e22ecef78b916f43e35832e1154da90361db2802/src/test/java/com/csviri/kubeapi/JUnitExtensionTest.java)
15
+
16
+
```java
17
+
@EnableAPIServer
18
+
classJUnitExtensionTest {
19
+
20
+
@Test
21
+
voidtestCommunication() {
22
+
var client =newKubernetesClientBuilder().build();
23
+
client.resource(configMap()).createOrReplace();
24
+
var cm = client.resource(configMap()).get();
25
+
26
+
assertThat(cm).isNotNull();
27
+
}
28
+
29
+
privateConfigMapconfigMap() {
30
+
returnnewConfigMapBuilder()
31
+
.withMetadata(newObjectMetaBuilder()
32
+
.withName("test1")
33
+
.withNamespace("default")
34
+
.build())
35
+
.withData(Map.of("key","data"))
36
+
.build();
37
+
}
38
+
39
+
}
40
+
```
41
+
10
42
### Download binaries
11
43
12
44
[`setup-envtest`](https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest#section-readme) can be used
0 commit comments