[APM] Update api tests to accomodate changes in API response#16
Merged
sorenlouv merged 4 commits intoadd-apm-debug-mode-settingfrom Mar 25, 2021
Merged
[APM] Update api tests to accomodate changes in API response#16sorenlouv merged 4 commits intoadd-apm-debug-mode-settingfrom
sorenlouv merged 4 commits intoadd-apm-debug-mode-settingfrom
Conversation
sorenlouv
commented
Mar 25, 2021
|
|
||
| import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; | ||
| import supertestAsPromised from 'supertest-as-promised'; | ||
| import supertest from 'supertest'; |
Owner
Author
There was a problem hiding this comment.
supertest-as-promised is deprecated since 2016: WhoopInc/supertest-as-promised@ab56510
fyi: @spalger perhaps the dep should be removed from kibana entirely?
Owner
Author
There was a problem hiding this comment.
Wow, what a coincidence that I notice that the day after Tyler created that issue :D Great!
smith
reviewed
Mar 25, 2021
| ); | ||
| try { | ||
| await createCustomLink(customLink); | ||
| expect(true).to.be(false); |
Owner
Author
There was a problem hiding this comment.
Thanks for the suggestions with expect.to.throwException. It looks much better:
expect(async () => {
await createCustomLink(customLink);
}).to.throwException((e) => {
expect(e.res.status).to.be(403);
expectSnapshot(e.res.body.message).toMatchInline(
`"To create custom links, you must be subscribed to an Elastic Gold license or above. With it, you'll have the ability to create custom links to improve your workflow when analyzing your services."`
);
});Unfortunately I couldn't make it work with promises. I'll merge this PR but will look into alternative options.
sorenlouv
pushed a commit
that referenced
this pull request
Jun 1, 2022
* [Unified search] Create unified search plugin * add unified_search into USES_STYLED_COMPONENTS * fix JEST group 4 * update limits for data plugin * fix: remove unifiedSearch plugin from x-pack/plugins/file_upload * feat: updated .github/CODEOWNERS and set @elastic/kibana-app-services as a code owner * apply PR comments * [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs' * feat: moved filter bar, apply filters folders and apply filter action from Data plugin to unified search plugin * fix Checks * fix Checks * fix Linting and Default CI Group #16 * fix Checks * fix Checks * fix Linting (with types) * fix show FILTER_BAR * fix Jest Tests * feat replece indexPatternsContranct in setIndexPatterns to DataViewsContract * feat: removed unnecessary interface in unified search * fix Checks * fix Checks * fix Jest Tests, Checks * fix Checks * resolve comments Co-authored-by: Alexey Antonov <alexwizp@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
sorenlouv
pushed a commit
that referenced
this pull request
Oct 5, 2023
elastic#167877) Revert of elastic#164574 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is required by: elastic#95146.
in elastic#95146 all APM api's were updated to return objects. This PR updates the API tests accordingly.
Additionally it adds a type safe client (
apmApiSupertest) which is based on the same types as the api client in APM.cc @dgieselaar @smith @shahzad31