Details
-
Task
-
Resolution: Done
-
L3 - Default
-
None
-
None
-
135
-
Not defined
Description
Context:
The `OptimizeRequestExecutor` was initially only used in the context of Integration tests. However with OPT-3081 we also reused it as a more reliable client for the optimize data generator used in the data migration tests. In that regard we noticed it's not as easy to reuse as it is tightly coupled to usage with the `EmbeddedOptimizeExtension`. We decoupled as far as necessary but the [initialization of the accessToken|EmbeddedOptimizeExtension] would have exceeded to scope. We should clean this up properly and allow to create a requestExectur more eaiser by e.g. just provided credentials of the default user to it's Ctor.
AT:
- RequestExecutor can be reused easily by just providing:
- default credentials
- optimize api URL
- objectmapper (but that might be omittable as well)
- `EmbeddedOptimizeExtension` & `TestEmbeddedCamundaOptimize` do not contain rst client implementations like `TestEmbeddedCamundaOptimize#authenticateDemo` but rather provide the default credentials to the executor that cares about doing the api call to obtain a token