Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit e87d47a

Browse files
committed
docs link
1 parent e52b9e2 commit e87d47a

File tree

6 files changed

+22
-2
lines changed

6 files changed

+22
-2
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Linux, Windows, Mac is supported.
99
See also [this blog](https://csviri.medium.com/introducing-jenvtest-kubernetes-api-server-tests-made-easy-for-java-4d02a9bb26d4)
1010
post regarding the motivation and more.
1111

12+
## Docs
13+
14+
See more documentation in [docs](https://github.com/java-operator-sdk/jenvtest/tree/main/docs) directory.
15+
1216
## Usage
1317

1418
Include dependency:

core/src/test/java/io/javaoperatorsdk/jenvtest/sample/JUnitExtensionOnMethodTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77

88
import static io.javaoperatorsdk.jenvtest.sample.TestUtils.simpleTest;
99

10+
/**
11+
* Shows usage for the case when fresh Kube API is started for each use test method.
12+
*/
1013
class JUnitExtensionOnMethodTest {
1114

15+
// not static in case if API server is restarted for each test
1216
@KubeConfig
1317
String kubeConfigYaml;
1418

core/src/test/java/io/javaoperatorsdk/jenvtest/sample/JUnitExtensionSimpleCaseTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@EnableKubeAPIServer
1313
class JUnitExtensionSimpleCaseTest {
1414

15+
// static is required in case the config is shared between test cases
1516
@KubeConfig
1617
static String kubeConfigYaml;
1718

docs/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ jenvtest is a relatively simple test that support integration testing with Kuber
44
The whole concept and implementation is relatively simple, this doc describes some high level concepts
55
and provides some more detailed information.
66

7+
## Samples
8+
9+
Samples are provided in form of unit tests in the [sample package](https://github.com/java-operator-sdk/jenvtest/tree/main/core/src/test/java/io/javaoperatorsdk/jenvtest/sample)
10+
in core.
11+
12+
For fabric8 client in [this package](https://github.com/java-operator-sdk/jenvtest/tree/main/fabric8/src/test/java/io/javaoperatorsdk/jenvtest/junit/sample)
13+
714
## Configuration Options
815

916
See available configuration options documented in [KubeAPIServerConfig](https://github.com/java-operator-sdk/jenvtest/blob/main/core/src/main/java/io/javaoperatorsdk/jenvtest/KubeAPIServerConfig.java#L6-L6)

fabric8/src/test/java/io/javaoperatorsdk/jenvtest/junit/JUnitFabric8ClientInjectPerMethodTest.java renamed to fabric8/src/test/java/io/javaoperatorsdk/jenvtest/junit/sample/JUnitFabric8ClientInjectPerMethodTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
package io.javaoperatorsdk.jenvtest.junit;
1+
package io.javaoperatorsdk.jenvtest.junit.sample;
22

33
import org.junit.jupiter.api.Test;
44

55
import io.fabric8.kubernetes.client.KubernetesClient;
6+
import io.javaoperatorsdk.jenvtest.junit.EnableKubeAPIServer;
7+
import io.javaoperatorsdk.jenvtest.junit.TestUtils;
68

79
class JUnitFabric8ClientInjectPerMethodTest {
810

fabric8/src/test/java/io/javaoperatorsdk/jenvtest/junit/JUnitFabric8ClientInjectionTest.java renamed to fabric8/src/test/java/io/javaoperatorsdk/jenvtest/junit/sample/JUnitFabric8ClientInjectionTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
package io.javaoperatorsdk.jenvtest.junit;
1+
package io.javaoperatorsdk.jenvtest.junit.sample;
22

33
import org.junit.jupiter.api.Test;
44

55
import io.fabric8.kubernetes.client.Config;
66
import io.fabric8.kubernetes.client.KubernetesClient;
77
import io.fabric8.kubernetes.client.KubernetesClientBuilder;
8+
import io.javaoperatorsdk.jenvtest.junit.EnableKubeAPIServer;
9+
import io.javaoperatorsdk.jenvtest.junit.KubeConfig;
810

911
import static io.javaoperatorsdk.jenvtest.junit.TestUtils.simpleTest;
1012

0 commit comments

Comments
 (0)