Skip to content

Fixed API Key Tests #127236

Merged
cuff-links merged 13 commits intoelastic:mainfrom
cuff-links:Fix_API_Keys_Test
Mar 24, 2022
Merged

Fixed API Key Tests #127236
cuff-links merged 13 commits intoelastic:mainfrom
cuff-links:Fix_API_Keys_Test

Conversation

@cuff-links
Copy link
Copy Markdown
Contributor

Closes #125275

@cuff-links cuff-links added test_ui_functional test_xpack_functional release_note:skip Skip the PR/issue when compiling release notes Feature:Functional Testing auto-backport Deprecated - use backport:version if exact versions are needed v8.2.0 v8.1.1 v7.17.2 labels Mar 9, 2022
@cuff-links
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@cuff-links
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@cuff-links
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@cuff-links cuff-links requested a review from LeeDr March 18, 2022 02:44
Copy link
Copy Markdown
Contributor

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

Good change, but there is a space to make it better

Comment thread x-pack/test/functional/apps/api_keys/home_page.ts Outdated
Copy link
Copy Markdown

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

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

I'm confused on what role(s) are required for this test. In the outer before method it's setting kibana_admin role, but in a inner before method it sets the role twice. This doesn't combine the two roles. If both roles are required they should be used in a comma-separated list.

    describe('deletes API key(s)', function () {
      before(async () => {
        await security.testUser.setRoles(['kibana_admin']);
        await security.testUser.setRoles(['test_api_keys']);
        await pageObjects.common.navigateToApp('apiKeys');
      });

@LeeDr
Copy link
Copy Markdown

LeeDr commented Mar 18, 2022

Do we know where the api keys shown in the screenshot in #125275 (comment) came from? If they're from another test, we should probably find that test and add a cleanup step there. It's fine to have a cleanup step here as well.

@cuff-links
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@cuff-links cuff-links requested review from LeeDr and dmlemeshko March 21, 2022 21:27
@cuff-links cuff-links dismissed dmlemeshko’s stale review March 22, 2022 06:50

addressed nits in commit.

Comment thread x-pack/test/functional/apps/api_keys/home_page.ts Outdated
@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@cuff-links cuff-links requested a review from dmlemeshko March 24, 2022 06:22
@wayneseymour wayneseymour self-requested a review March 24, 2022 15:23
Copy link
Copy Markdown
Contributor

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

LGTM

@cuff-links cuff-links dismissed dmlemeshko’s stale review March 24, 2022 15:45

Updated PR per nits but still says change requested. I think this is a GitHub bug.

@cuff-links cuff-links merged commit b887d38 into elastic:main Mar 24, 2022
kibanamachine added a commit that referenced this pull request Mar 24, 2022
* Added code to remove existing API keys before and after all tests.

* Fixed delete function.

* Fixing nits in PR.

* Fixed test.

* Removed await keywords per nits and broke out clearAllApiKeys() to a helper file.

* Added types for typescript

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b887d38)
kibanamachine added a commit that referenced this pull request Mar 24, 2022
* Added code to remove existing API keys before and after all tests.

* Fixed delete function.

* Fixing nits in PR.

* Fixed test.

* Removed await keywords per nits and broke out clearAllApiKeys() to a helper file.

* Added types for typescript

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b887d38)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.1
7.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 28, 2022
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

1 similar comment
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

cuff-links pushed a commit to cuff-links/kibana that referenced this pull request Mar 30, 2022
* Added code to remove existing API keys before and after all tests.

* Fixed delete function.

* Fixing nits in PR.

* Fixed test.

* Removed await keywords per nits and broke out clearAllApiKeys() to a helper file.

* Added types for typescript

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b887d38)
cuff-links pushed a commit to cuff-links/kibana that referenced this pull request Mar 30, 2022
* Added code to remove existing API keys before and after all tests.

* Fixed delete function.

* Fixing nits in PR.

* Fixed test.

* Removed await keywords per nits and broke out clearAllApiKeys() to a helper file.

* Added types for typescript

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b887d38)
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

cuff-links pushed a commit that referenced this pull request Mar 31, 2022
* Fixed API Key Tests  (#127236)

* Added code to remove existing API keys before and after all tests.

* Fixed delete function.

* Fixing nits in PR.

* Fixed test.

* Removed await keywords per nits and broke out clearAllApiKeys() to a helper file.

* Added types for typescript

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b887d38)

* Fixed API Key Tests  (#127236)

* Added code to remove existing API keys before and after all tests.

* Fixed delete function.

* Fixing nits in PR.

* Fixed test.

* Removed await keywords per nits and broke out clearAllApiKeys() to a helper file.

* Added types for typescript

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b887d38)

* Added explicity any to key because the type is not available yet.
kibanamachine added a commit that referenced this pull request Mar 31, 2022
* Fixed API Key Tests  (#127236)

* Added code to remove existing API keys before and after all tests.

* Fixed delete function.

* Fixing nits in PR.

* Fixed test.

* Removed await keywords per nits and broke out clearAllApiKeys() to a helper file.

* Added types for typescript

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b887d38)

* Added explicity any to key because the type is not available yet.

Co-authored-by: John Dorlus <silne.dorlus@elastic.co>
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

2 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@cuff-links cuff-links removed the v7.17.2 label Apr 5, 2022
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

3 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed Feature:Functional Testing release_note:skip Skip the PR/issue when compiling release notes test_ui_functional test_xpack_functional v8.1.1 v8.2.0

Projects

None yet

6 participants