|
1 | 1 | package io.javaoperatorsdk.operator.processing.event.internal;
|
2 | 2 |
|
3 |
| -import java.text.ParseException; |
4 |
| -import java.time.LocalDateTime; |
5 |
| -import java.time.format.DateTimeFormatter; |
6 | 3 | import java.util.Date;
|
7 | 4 | import java.util.concurrent.TimeUnit;
|
8 | 5 | import java.util.concurrent.atomic.AtomicInteger;
|
|
16 | 13 |
|
17 | 14 | import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
|
18 | 15 | import io.fabric8.kubernetes.client.KubernetesClient;
|
19 |
| -import io.fabric8.kubernetes.client.VersionInfo; |
20 | 16 | import io.fabric8.kubernetes.client.server.mock.EnableKubernetesMockClient;
|
21 | 17 | import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer;
|
22 | 18 | import io.javaoperatorsdk.operator.Operator;
|
@@ -49,24 +45,7 @@ public class CustomResourceSelectorTest {
|
49 | 45 |
|
50 | 46 | @SuppressWarnings("unchecked")
|
51 | 47 | @BeforeEach
|
52 |
| - void setUpResources() throws ParseException { |
53 |
| - String buildDate = |
54 |
| - DateTimeFormatter.ofPattern(VersionInfo.VersionKeys.BUILD_DATE_FORMAT) |
55 |
| - .format(LocalDateTime.now()); |
56 |
| - |
57 |
| - server |
58 |
| - .expect() |
59 |
| - .get() |
60 |
| - .withPath("/version") |
61 |
| - .andReturn( |
62 |
| - 200, |
63 |
| - new VersionInfo.Builder() |
64 |
| - .withBuildDate(buildDate) |
65 |
| - .withMajor("1") |
66 |
| - .withMinor("21") |
67 |
| - .build()) |
68 |
| - .always(); |
69 |
| - |
| 48 | + void setUpResources() { |
70 | 49 | configurationService = spy(ConfigurationService.class);
|
71 | 50 | when(configurationService.checkCRDAndValidateLocalModel()).thenReturn(false);
|
72 | 51 | when(configurationService.getVersion()).thenReturn(new Version("1", "1", new Date()));
|
|
0 commit comments