-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] Update serverless FTR tests to not run with operator privileges #185870
Conversation
/ci |
/ci |
1 similar comment
/ci |
cd0430f
to
dcccaa4
Compare
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
/ci |
dcccaa4
to
fe033a9
Compare
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.
Just one question so far.
.../security_solution_api_integration/config/services/security_solution_serverless_supertest.ts
Outdated
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.
Sorry about the false LGTM, but I do have one question.
Related to #185870 In this PR I move user_profile fetching out of SAML session creation to its `sessionManager.getUserData()`: - rely on Kibana Security API for both local/Kibana CI and MKI cases (currently it is cloud and cached on saml session creation) - do not cache profile data in test service, Kibana API is fast enough I deleted the tests that no longer relevant
@nikitaindik each team should take care of their tests for that specific case :) |
@nikitaindik - supertest = await utils.createSuperTest();
+ supertest = await utils.createSuperTest('role'); If some test resources require an admin role to be created, the test has to instantiate two super test instances. Like here: adminSupertest = await utils.createSuperTest('admin');
viewerSupertest = await utils.createSuperTest('viewer'); |
@dmlemeshko @wayneseymour Could you please take a second look? |
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.
Just a bit more and I think this will be good.
:LGTM: |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: |
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.
LGTM!
## Summary 1. Apply #185870 for Security Solution Explore and Investigation tests. 2. Remove duplicated tests. 3. Investigation/timeline/serverless tests are skipped atm. How to run the api integration tests (Use Investigation Timeline ESS as an example) ``` cd x-pack node scripts/functional_tests_server.js --config ./test/security_solution_api_integration/test_suites/investigation/timeline/trial_license_complete_tier/configs/ess.config.ts // After server is started, open another terminal cd x-pack node ../scripts/functional_test_runner --config=test/security_solution_api_integration/test_suites/investigation/timeline/trial_license_complete_tier/configs/ess.config.ts ``` --------- Co-authored-by: kibanamachine <[email protected]>
Summary
supertest
with a custom implementation that adds auth headersusername
updatesSessionManager
to storeusername
securitySolutionUtils
to return theusername
getUsername
helperFlaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6320
Know issues
utils.createSuperTest('viewer')
fails on the API creation. It will be fixed by @elastic/kibana-security [POC] Serverless API integration test helper - create API key as admin #184948Checklist
Delete any items that are not applicable to this PR.