|
6 | 6 | import static org.mockito.Mockito.verify;
|
7 | 7 | import static org.mockito.Mockito.when;
|
8 | 8 |
|
9 |
| -import io.javaoperatorsdk.operator.api.config.ControllerConfiguration; |
10 | 9 | import java.time.LocalDateTime;
|
11 |
| -import java.util.Arrays; |
12 |
| - |
13 | 10 | import java.util.List;
|
| 11 | + |
14 | 12 | import org.junit.jupiter.api.BeforeEach;
|
15 | 13 | import org.junit.jupiter.api.Test;
|
16 | 14 |
|
|
19 | 17 | import io.fabric8.kubernetes.client.dsl.MixedOperation;
|
20 | 18 | import io.fabric8.kubernetes.client.dsl.Resource;
|
21 | 19 | import io.javaoperatorsdk.operator.TestUtils;
|
| 20 | +import io.javaoperatorsdk.operator.api.config.AbstractControllerConfiguration; |
22 | 21 | import io.javaoperatorsdk.operator.api.config.ConfigurationService;
|
23 | 22 | import io.javaoperatorsdk.operator.processing.ConfiguredController;
|
24 | 23 | import io.javaoperatorsdk.operator.processing.event.EventHandler;
|
@@ -113,30 +112,15 @@ public MixedOperation<TestCustomResource, KubernetesResourceList<TestCustomResou
|
113 | 112 | return client;
|
114 | 113 | }
|
115 | 114 | }
|
116 |
| - private static class TestConfiguration implements |
117 |
| - ControllerConfiguration<TestCustomResource> { |
| 115 | + private static class TestConfiguration extends |
| 116 | + AbstractControllerConfiguration<TestCustomResource> { |
118 | 117 |
|
119 | 118 | final ConfigurationService service = mock(ConfigurationService.class);
|
120 |
| - final boolean generationAware; |
121 | 119 |
|
122 | 120 | public TestConfiguration(boolean generationAware) {
|
| 121 | + super(null, null, null, FINALIZER, generationAware, null, null, null); |
123 | 122 | when(service.getObjectMapper()).thenReturn(ConfigurationService.OBJECT_MAPPER);
|
124 |
| - this.generationAware = generationAware; |
125 |
| - } |
126 |
| - |
127 |
| - @Override |
128 |
| - public String getAssociatedControllerClassName() { |
129 |
| - return null; |
130 |
| - } |
131 |
| - |
132 |
| - @Override |
133 |
| - public ConfigurationService getConfigurationService() { |
134 |
| - return service; |
135 |
| - } |
136 |
| - |
137 |
| - @Override |
138 |
| - public boolean isGenerationAware() { |
139 |
| - return generationAware; |
| 123 | + setConfigurationService(service); |
140 | 124 | }
|
141 | 125 | }
|
142 | 126 | }
|
0 commit comments