File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -204,3 +204,28 @@ public class Application {
204
204
}
205
205
}
206
206
```
207
+
208
+ #### Spring Boot test support
209
+
210
+ Adding the following dependency would let you mock the operator for the
211
+ tests where loading the spring container is necessary,
212
+ but it doesn't need real access to a Kubernetes cluster.
213
+
214
+ ``` xml
215
+ <dependency >
216
+ <groupId >io.javaoperatorsdk</groupId >
217
+ <artifactId >operator-framework-spring-boot-starter-test</artifactId >
218
+ <version >{see https://search.maven.org/search?q=a:operator-framework-spring-boot-starter for latest version}</version >
219
+ </dependency >
220
+ ```
221
+
222
+ Mock the operator:
223
+ ``` java
224
+ @SpringBootTest
225
+ @EnableMockOperator
226
+ public class SpringBootStarterSampleApplicationTest {
227
+
228
+ @Test
229
+ void contextLoads () {}
230
+ }
231
+ ```
You can’t perform that action at this time.
0 commit comments