Skip to content

Commit af36b56

Browse files
csvirimetacosm
andcommitted
refactor: move integration tests to feature packages and sub packages based on type (#2483)
* refactor: integration tests moved to feature packages and sub packages pased on type Signed-off-by: Attila Mészáros <[email protected]> * fix resource paths Signed-off-by: Attila Mészáros <[email protected]> * fixes Signed-off-by: Attila Mészáros <[email protected]> * link and test fixes Signed-off-by: Attila Mészáros <[email protected]> * format Signed-off-by: Attila Mészáros <[email protected]> * wip Signed-off-by: Attila Mészáros <[email protected]> * old service Signed-off-by: Attila Mészáros <[email protected]> * test fix Signed-off-by: Attila Mészáros <[email protected]> * refactor: remove unneeded classes Signed-off-by: Chris Laprun <[email protected]> * fix: typo in package name Signed-off-by: Chris Laprun <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]>
1 parent 4f444c6 commit af36b56

File tree

453 files changed

+785
-998
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

453 files changed

+785
-998
lines changed

Diff for: docs/content/en/docs/dependent-resources/_index.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ customized by implementing
291291
by the dependent resource.
292292

293293
See sample in one of the integration
294-
tests [here](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/primaryindexer/DependentPrimaryIndexerTestReconciler.java#L25-L25)
294+
tests [here](https://github.com/operator-framework/java-operator-sdk/tree/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/primaryindexer)
295295
.
296296

297297
## Multiple Dependent Resources of Same Type
@@ -310,7 +310,7 @@ There might be casees, though, where it might be problematic to call the `desire
310310
- Override the `selectManagedSecondaryResource` method, if your `DependentResource` extends `AbstractDependentResource`.
311311
This should be relatively simple to override this method to optimize the matching to your needs. You can see an
312312
example of such an implementation in
313-
the [`ExternalWithStateDependentResource`](https://github.com/operator-framework/java-operator-sdk/blob/6cd0f884a7c9b60c81bd2d52da54adbd64d6e118/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/externalstate/ExternalWithStateDependentResource.java#L43-L49)
313+
the [`ExternalWithStateDependentResource`](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/externalstate/ExternalWithStateDependentResource.java)
314314
class.
315315
- Override the `managedSecondaryResourceID` method, if your `DependentResource` extends `KubernetesDependentResource`,
316316
where it's very often possible to easily determine the `ResourceID` of the secondary resource. This would probably be
@@ -333,9 +333,9 @@ would look as follows:
333333
```
334334

335335
A sample is provided as an integration test both:
336-
for [managed](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/MultipleManagedDependentNoDiscriminatorIT.java)
336+
for [managed](https://github.com/operator-framework/java-operator-sdk/tree/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/multipledrsametypenodiscriminator)
337337

338-
For [standalone](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/MultipleDependentResourceIT.java)
338+
For [standalone](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/multipledependentresource)
339339
cases.
340340

341341
## Bulk Dependent Resources
@@ -352,11 +352,11 @@ implement the
352352
interface.
353353

354354
Various examples are provided
355-
as [integration tests](https://github.com/java-operator-sdk/java-operator-sdk/tree/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/bulkdependent)
355+
as [integration tests](https://github.com/operator-framework/java-operator-sdk/tree/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/bulkdependent)
356356
.
357357

358358
To see how bulk dependent resources interact with workflow conditions, please refer to this
359-
[integration test](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/bulkdependent/BulkDependentWithConditionIT.java).
359+
[integration test](https://github.com/operator-framework/java-operator-sdk/tree/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/bulkdependent/conidition).
360360

361361
## External State Tracking Dependent Resources
362362

@@ -377,11 +377,11 @@ interface. Note that most of the JOSDK-provided dependent resource implementatio
377377
`PollingDependentResource` or `PerResourcePollingDependentResource` already extends
378378
`AbstractExternalDependentResource`, thus supporting external state tracking out of the box.
379379

380-
See [integration test](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/ExternalStateDependentIT.java)
380+
See [integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/externalstate/ExternalStateDependentIT.java)
381381
as a sample.
382382

383383
For a better understanding it might be worth to study
384-
a [sample implementation](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/externalstate/ExternalStateReconciler.java)
384+
a [sample implementation](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/externalstate/ExternalStateReconciler.java)
385385
without dependent resources.
386386

387387
Please also refer to the [docs](/docs/patterns-and-best-practices#managing-state) for managing state in
@@ -395,7 +395,7 @@ created. For example, if three bulk dependent resources associated with external
395395
three associated `ConfigMaps` (assuming `ConfigMaps` are used as a state-tracking resource) will
396396
also be created, one per dependent resource.
397397

398-
See [integration test](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/ExternalStateBulkIT.java)
398+
See [integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/externalstate/externalstatebulkdependent)
399399
as a sample.
400400

401401
## GenericKubernetesResource based Dependent Resources
@@ -435,13 +435,13 @@ samples [here](https://github.com/java-operator-sdk/java-operator-sdk/tree/main/
435435
practice in general) - so for example if there are two config map dependents, either
436436
there should be a shared event source between them, or a label selector on the event sources
437437
to select only the relevant events, see
438-
in [related integration test](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/orderedmanageddependent/ConfigMapDependentResource1.java)
438+
in [related integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/orderedmanageddependent/ConfigMapDependentResource2.java)
439439
.
440440

441441
## "Read-only" Dependent Resources vs. Event Source
442442

443443
See Integration test for a read-only
444-
dependent [here](https://github.com/java-operator-sdk/java-operator-sdk/blob/249b41f3c68c4d0e9c77c41eca647a69a24347b0/operator-framework/src/test/java/io/javaoperatorsdk/operator/PrimaryToSecondaryDependentIT.java).
444+
dependent [here](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/dependent/primarytosecondaydependent/ConfigMapDependent.java).
445445

446446
Some secondary resources only exist as input for the reconciliation process and are never
447447
updated *by a controller* (they might, and actually usually do, get updated by users interacting

Diff for: docs/content/en/docs/features/_index.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ using [Server Side Apply (SSA)](https://kubernetes.io/docs/reference/using-api/s
9797
It is important to understand how SSA works in Kubernetes. Mainly, resources applied using SSA
9898
should contain only the fields identifying the resource and those the user is interested in (a 'fully specified intent'
9999
in Kubernetes parlance), thus usually using a resource created from scratch, see
100-
[sample](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/patchresourcewithssa/PatchResourceWithSSAReconciler.java#L18-L22).
101-
To contrast, see the same sample, this time [without SSA](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/patchresourceandstatusnossa/PatchResourceAndStatusNoSSAReconciler.java#L16-L16).
100+
[sample](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/patchresourcewithssa).
101+
To contrast, see the same sample, this time [without SSA](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/patchresourceandstatusnossa/PatchResourceAndStatusNoSSAReconciler.java).
102102

103103
Non-SSA based patch is still supported.
104104
You can control whether or not to use SSA
105105
using [`ConfigurationServcice.useSSAToPatchPrimaryResource()`](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java#L385-L385)
106106
and the related `ConfigurationServiceOverrider.withUseSSAToPatchPrimaryResource` method.
107107
Related integration test can be
108-
found [here](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/patchresourceandstatusnossa/PatchResourceAndStatusNoSSAReconciler.java).
108+
found [here](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/patchresourceandstatusnossa).
109109

110110
Handling resources directly using the client, instead of delegating these updates operations to JOSDK by returning
111111
an `UpdateControl` at the end of your reconciliation, should work appropriately. However, we do recommend to
@@ -204,7 +204,7 @@ A Controller can be registered for a non-custom resource, so well known Kubernet
204204
`Ingress`, `Deployment`,...).
205205

206206
See
207-
the [integration test](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/deployment/DeploymentReconciler.java)
207+
the [integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/deployment)
208208
for reconciling deployments.
209209

210210
```java
@@ -531,7 +531,7 @@ between a primary resource and its associated secondary resources using an imple
531531
`PrimaryToSecondaryMapper` interface. This is typically needed when there are many-to-one or
532532
many-to-many relationships between primary and secondary resources, e.g. when the primary resource
533533
is referencing secondary resources.
534-
See [PrimaryToSecondaryIT](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/PrimaryToSecondaryIT.java)
534+
See [PrimaryToSecondaryIT](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/primarytosecondary/PrimaryToSecondaryIT.java)
535535
integration test for a sample.
536536

537537
### Built-in EventSources
@@ -667,7 +667,7 @@ As seen in the above code snippet, the informer will have the initial namespaces
667667
controller, but also will adjust the target namespaces if it changes for the controller.
668668

669669
See also
670-
the [integration test](https://github.com/java-operator-sdk/java-operator-sdk/blob/ec37025a15046d8f409c77616110024bf32c3416/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/changenamespace/ChangeNamespaceTestReconciler.java)
670+
the [integration test](https://github.com/operator-framework/java-operator-sdk/tree/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/changenamespace)
671671
for this feature.
672672

673673
## Leader Election

Diff for: docs/content/en/docs/workflows/_index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ reconciliation process.
4646
[CRDPresentActivationCondition](https://github.com/operator-framework/java-operator-sdk/blob/ba5e33527bf9e3ea0bd33025ccb35e677f9d44b4/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/workflow/CRDPresentActivationCondition.java)
4747
that will prevent the associated dependent resource from being activated if the Custom Resource Definition associated
4848
with the dependent's resource type is not present on the cluster.
49-
See related [integration test](https://github.com/operator-framework/java-operator-sdk/blob/ba5e33527bf9e3ea0bd33025ccb35e677f9d44b4/operator-framework/src/test/java/io/javaoperatorsdk/operator/CRDPresentActivationConditionIT.java).
49+
See related [integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/crdpresentactivation).
5050

5151
To have multiple resources of same type with an activation condition is a bit tricky, since you
5252
don't want to have multiple `InformerEventSource` for the same type, you have to explicitly
@@ -67,7 +67,7 @@ You can access the results for conditions from the `WorkflowResult` instance tha
6767
evaluated. You can access that result from the `ManagedWorkflowAndDependentResourceContext` accessible from the
6868
reconciliation `Context`. You can then access individual condition results using the `
6969
getDependentConditionResult` methods. You can see an example of this
70-
in [this integration test](https://github.com/operator-framework/java-operator-sdk/blob/fd0e92c0de55c47d5df50658cf4e147ee5e6102d/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/workflowallfeature/WorkflowAllFeatureReconciler.java#L44-L49).
70+
in [this integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/workflowallfeature/WorkflowAllFeatureReconciler.java).
7171

7272
## Defining Workflows
7373

@@ -350,7 +350,7 @@ checks that the resource is actually removed or that it, at least, doesn't have
350350
provides such a delete post-condition implementation in the form of
351351
[`KubernetesResourceDeletedCondition`](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/workflow/KubernetesResourceDeletedCondition.java)
352352

353-
Also, check usage in an [integration test](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/manageddependentdeletecondition/ManagedDependentDefaultDeleteConditionReconciler.java).
353+
Also, check usage in an [integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/manageddependentdeletecondition/ManagedDependentDefaultDeleteConditionReconciler.java).
354354

355355
In such cases the Kubernetes Dependent Resource should extend `CRUDNoGCKubernetesDependentResource`
356356
and NOT `CRUDKubernetesDependentResource` since otherwise the Kubernetes Garbage Collector would delete the resources.
@@ -373,13 +373,13 @@ ManagedWorkflowAndDependentResourceContext` retrieved from the reconciliation `C
373373
resource reconciler `reconcile` method arguments.
374374

375375
See
376-
related [integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/WorkflowExplicitInvocationIT.java)
376+
related [integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/workflowexplicitinvocation)
377377
for more details.
378378

379379
For `cleanup`, if the `Cleaner` interface is implemented, the `cleanupManageWorkflow()` needs to be called explicitly.
380380
However, if `Cleaner` interface is not implemented, it will be called implicitly.
381381
See
382-
related [integration test](https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/WorkflowExplicitCleanupIT.java).
382+
related [integration test](https://github.com/operator-framework/java-operator-sdk/tree/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/workflowexplicitcleanup).
383383

384384
While nothing prevents calling the workflow multiple times in a reconciler, it isn't typical or even recommended to do
385385
so. Conversely, if explicit invocation is requested but `reconcileManagedWorkflow` is not called in the primary resource

Diff for: operator-framework/src/test/java/io/javaoperatorsdk/operator/ConcurrencyIT.java renamed to operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/ConcurrencyIT.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.javaoperatorsdk.operator;
1+
package io.javaoperatorsdk.operator.baseapi;
22

33
import java.util.List;
44
import java.util.concurrent.TimeUnit;
@@ -10,9 +10,9 @@
1010
import org.slf4j.LoggerFactory;
1111

1212
import io.fabric8.kubernetes.api.model.ConfigMap;
13+
import io.javaoperatorsdk.operator.baseapi.simple.TestCustomResource;
14+
import io.javaoperatorsdk.operator.baseapi.simple.TestReconciler;
1315
import io.javaoperatorsdk.operator.junit.LocallyRunOperatorExtension;
14-
import io.javaoperatorsdk.operator.sample.simple.TestCustomResource;
15-
import io.javaoperatorsdk.operator.sample.simple.TestReconciler;
1616
import io.javaoperatorsdk.operator.support.TestUtils;
1717

1818
import static org.assertj.core.api.Assertions.assertThat;

Diff for: operator-framework/src/test/java/io/javaoperatorsdk/operator/InformerErrorHandlerStartIT.java renamed to operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/InformerErrorHandlerStartIT.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.javaoperatorsdk.operator;
1+
package io.javaoperatorsdk.operator.baseapi;
22

33
import java.time.Duration;
44

@@ -9,6 +9,7 @@
99
import io.fabric8.kubernetes.client.ConfigBuilder;
1010
import io.fabric8.kubernetes.client.KubernetesClient;
1111
import io.fabric8.kubernetes.client.KubernetesClientBuilder;
12+
import io.javaoperatorsdk.operator.Operator;
1213
import io.javaoperatorsdk.operator.api.reconciler.Context;
1314
import io.javaoperatorsdk.operator.api.reconciler.ControllerConfiguration;
1415
import io.javaoperatorsdk.operator.api.reconciler.Reconciler;

Diff for: operator-framework/src/test/java/io/javaoperatorsdk/operator/LeaderElectionPermissionIT.java renamed to operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/LeaderElectionPermissionIT.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
package io.javaoperatorsdk.operator;
1+
package io.javaoperatorsdk.operator.baseapi;
22

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

55
import io.fabric8.kubernetes.api.model.ConfigMap;
6-
import io.fabric8.kubernetes.api.model.authorization.v1.*;
76
import io.fabric8.kubernetes.api.model.rbac.Role;
87
import io.fabric8.kubernetes.api.model.rbac.RoleBinding;
98
import io.fabric8.kubernetes.client.ConfigBuilder;
109
import io.fabric8.kubernetes.client.KubernetesClient;
1110
import io.fabric8.kubernetes.client.KubernetesClientBuilder;
11+
import io.javaoperatorsdk.operator.Operator;
12+
import io.javaoperatorsdk.operator.OperatorException;
13+
import io.javaoperatorsdk.operator.ReconcilerUtils;
1214
import io.javaoperatorsdk.operator.api.config.LeaderElectionConfiguration;
1315
import io.javaoperatorsdk.operator.api.reconciler.Context;
1416
import io.javaoperatorsdk.operator.api.reconciler.ControllerConfiguration;

Diff for: operator-framework/src/test/java/io/javaoperatorsdk/operator/BuiltInResourceCleanerIT.java renamed to operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/builtinresourcecleaner/BuiltInResourceCleanerIT.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.javaoperatorsdk.operator;
1+
package io.javaoperatorsdk.operator.baseapi.builtinresourcecleaner;
22

33
import java.util.Map;
44

@@ -8,8 +8,9 @@
88
import org.slf4j.LoggerFactory;
99

1010
import io.fabric8.kubernetes.api.model.Service;
11+
import io.javaoperatorsdk.operator.ReconcilerUtils;
12+
import io.javaoperatorsdk.operator.dependent.standalonedependent.StandaloneDependentResourceIT;
1113
import io.javaoperatorsdk.operator.junit.LocallyRunOperatorExtension;
12-
import io.javaoperatorsdk.operator.sample.builtinresourcecleaner.ObservedGenerationTestReconciler;
1314

1415
import static org.assertj.core.api.Assertions.assertThat;
1516
import static org.awaitility.Awaitility.await;
@@ -21,7 +22,7 @@ class BuiltInResourceCleanerIT {
2122
@RegisterExtension
2223
LocallyRunOperatorExtension operator =
2324
LocallyRunOperatorExtension.builder()
24-
.withReconciler(new ObservedGenerationTestReconciler())
25+
.withReconciler(new BuiltInResourceCleanerReconciler())
2526
.build();
2627

2728
/**
@@ -33,7 +34,7 @@ void cleanerIsCalledOnBuiltInResource() {
3334
var service = operator.create(testService());
3435

3536
await().untilAsserted(() -> {
36-
assertThat(operator.getReconcilerOfType(ObservedGenerationTestReconciler.class)
37+
assertThat(operator.getReconcilerOfType(BuiltInResourceCleanerReconciler.class)
3738
.getReconcileCount()).isPositive();
3839
var actualService = operator.get(Service.class, service.getMetadata().getName());
3940
assertThat(actualService.getMetadata().getFinalizers()).isNotEmpty();
@@ -42,14 +43,14 @@ void cleanerIsCalledOnBuiltInResource() {
4243
operator.delete(service);
4344

4445
await().untilAsserted(() -> {
45-
assertThat(operator.getReconcilerOfType(ObservedGenerationTestReconciler.class)
46+
assertThat(operator.getReconcilerOfType(BuiltInResourceCleanerReconciler.class)
4647
.getCleanCount()).isPositive();
4748
});
4849
}
4950

5051
Service testService() {
5152
Service service = ReconcilerUtils.loadYaml(Service.class, StandaloneDependentResourceIT.class,
52-
"service-template.yaml");
53+
"/io/javaoperatorsdk/operator/service-template.yaml");
5354
service.getMetadata().setLabels(Map.of("builtintest", "true"));
5455
return service;
5556
}

0 commit comments

Comments
 (0)