Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Watcher] Remove axios dependency in tests #128765

Merged
merged 7 commits into from
Mar 31, 2022

Conversation

sabarasaba
Copy link
Member

Partially addresses #127966

Summary

In order to upgrade the axios dependency in kibana(see: #111655) we need to switch the tests from this app to use HttpSetup mock instead of axios + sinon server mock, which is technically incorrect but axios just happened to have methods signature similar to HttpSetup.

@sabarasaba sabarasaba added Feature:Watcher Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v8.2.0 labels Mar 29, 2022
@sabarasaba sabarasaba self-assigned this Mar 29, 2022
@sabarasaba sabarasaba added v8.3.0 and removed v8.2.0 labels Mar 29, 2022
@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba sabarasaba marked this pull request as ready for review March 30, 2022 12:23
@sabarasaba sabarasaba requested a review from a team as a code owner March 30, 2022 12:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Nice job @sabarasaba! Left a couple comments. Let me know what you think.

@sabarasaba
Copy link
Member Author

Thanks for the review @alisonelizabeth! I've addressed your points with 7c9f134

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
watcher 2 3 +1

Total ESLint disabled count

id before after diff
watcher 2 3 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @sabarasaba

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my feedback! Latest LGTM.

@sabarasaba sabarasaba added backport:skip This commit does not require backporting and removed auto-backport Deprecated - use backport:version if exact versions are needed labels Mar 31, 2022
@sabarasaba sabarasaba merged commit 1caaaba into elastic:main Mar 31, 2022
sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Mar 31, 2022
* wip start refactoring tests

* commit using @elastic.co

* Finish refactoring tests

* Remove unused code

* Add docs

* Address CR changes

(cherry picked from commit 1caaaba)

# Conflicts:
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts
#	x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx
#	x-pack/plugins/watcher/__jest__/client_integration/watch_edit.test.ts
sabarasaba added a commit that referenced this pull request Apr 4, 2022
* [Watcher] Remove `axios` dependency in tests (#128765)

* wip start refactoring tests

* commit using @elastic.co

* Finish refactoring tests

* Remove unused code

* Add docs

* Address CR changes

(cherry picked from commit 1caaaba)

# Conflicts:
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts
#	x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts
#	x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx
#	x-pack/plugins/watcher/__jest__/client_integration/watch_edit.test.ts

* Fix test and linter

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Watcher release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants