-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[FTR](combined) update common serverless api tests to use api keys #181741
[FTR](combined) update common serverless api tests to use api keys #181741
Conversation
\ci |
fe430a7
to
7975cb4
Compare
\ci |
1 similar comment
\ci |
7975cb4
to
af3a6c3
Compare
but now an assertion is failing.
x-pack/test_serverless/api_integration/test_suites/common/core/translations.ts
Outdated
Show resolved
Hide resolved
\ci |
…vrless-api-tests/combined
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#5974[✅] x-pack/test_serverless/api_integration/test_suites/observability/common_configs/config.group1.ts: 25/25 tests passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @wayneseymour! Left few comments, let me know what you think 🚀
x-pack/test_serverless/api_integration/test_suites/common/console/autocomplete_entities.ts
Show resolved
Hide resolved
x-pack/test_serverless/api_integration/test_suites/common/console/proxy_route.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @wayneseymour I left some non-blocking questions
.expect(200); | ||
expect(body.host).to.be.ok(); | ||
await svlUserManager.invalidateApiKeyForRole(roleAuthc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion : using before
/ after
hooks to generate/invalidate API key; This way we will invalidate key even if it
fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x-pack/test_serverless/api_integration/test_suites/common/console/proxy_route.ts
Show resolved
Hide resolved
x-pack/test_serverless/api_integration/test_suites/common/core/compression.ts
Outdated
Show resolved
Hide resolved
.get('/') | ||
.set(svlCommonApi.getCommonRequestHeader()) | ||
.set(roleAuthc.apiKeyHeader) | ||
.redirects(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: could you explain why do we need to allow redirects here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I do not know.
What I do know, is that the request fails without this, after I added my changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's double check with code owners here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be @pheyos :)
import { FtrProviderContext } from '../../functional/ftr_provider_context'; | ||
|
||
export type SupertestWithoutAuthType = ProvidedType<typeof SupertestWithoutAuthProvider>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no ResponseOps code changes here, near as I can tell - I think there were previously some RO-hitting commits previously ...
Took a quick peek, as it appears the RO changes will be coming in a separate PR - a view of things to come! LGTM
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
Thanks Pat!! |
Summary
Contributes to: #180834
Update the below common tests, and figure out the minimum required role.
More Info
InternalRequestHeader
SupertestWithoutAuth
createApiKeyForDefaultRole
toServerless User Manager
serviceawait supertest
toawait supertestWithoutAuth
await supertestWithoutAuth
http callviewer
,editor
,developer
, oradmin
Covers these folders:
x-pack/test_serverless/api_integration/test_suites/common/console
x-pack/test_serverless/api_integration/test_suites/common/core
x-pack/test_serverless/api_integration/test_suites/common/data_view_field_editor
x-pack/test_serverless/api_integration/test_suites/common/elasticsearch_api
x-pack/test_serverless/api_integration/test_suites/common/grok_debugger
x-pack/test_serverless/api_integration/test_suites/common/kql_telemetry
x-pack/test_serverless/api_integration/test_suites/common/scripts_tests
x-pack/test_serverless/api_integration/test_suites/common/search_profiler
x-pack/test_serverless/api_integration/test_suites/common/search_xpack