Skip to content

Conversation

@probakowski
Copy link
Contributor

@probakowski probakowski commented Jan 23, 2020

This change centralizes initialization of Client, AdminClient and IndicesAdminClient for all classes extending AbstractStepTestCase.
This removes a lot of code duplication and make it easier to write tests.
This also removes need for AsyncActionStep#setClient.

This change centralizes initialization of `Client`, `AdminClient`
and `IndicesAdminClient` for all classes extending `AbstractStepTestCase`.
This removes a lot of code duplication and make it easier to write tests.
This also removes need for `AsyncActionStep#setClient`
@probakowski probakowski added >test Issues or PRs that are addressing/adding tests >refactoring :Data Management/ILM+SLM Index and Snapshot lifecycle management v8.0.0 v7.7.0 labels Jan 23, 2020
@probakowski probakowski requested a review from andreidan January 23, 2020 22:55
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/ILM+SLM)

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great refactoring, thanks @probakowski

@probakowski probakowski merged commit 505b4d8 into elastic:master Jan 24, 2020
@probakowski probakowski deleted the refactor-step-tests branch January 24, 2020 22:39
probakowski added a commit that referenced this pull request Jan 25, 2020
* Centralize mocks initialization in ILM steps tests

This change centralizes initialization of `Client`, `AdminClient`
and `IndicesAdminClient` for all classes extending `AbstractStepTestCase`.
This removes a lot of code duplication and make it easier to write tests.
This also removes need for `AsyncActionStep#setClient`

* Unused imports removed

* Added missed tests

* Fix OpenFollowerIndexStepTests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/ILM+SLM Index and Snapshot lifecycle management >refactoring >test Issues or PRs that are addressing/adding tests v7.7.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants