Adjust integration tests to make them work with fleet service token.#1039
Adjust integration tests to make them work with fleet service token.#1039aleksmaus merged 5 commits intoelastic:masterfrom
Conversation
|
This pull request does not have a backport label. Could you fix it @aleksmaus? 🙏
NOTE: |
| client.UpdateByQuery.WithBody(reader), | ||
| client.UpdateByQuery.WithContext(ctx), | ||
| client.UpdateByQuery.WithRefresh(true), | ||
| client.UpdateByQuery.WithConflicts("proceed"), |
There was a problem hiding this comment.
had to remove
client.UpdateByQuery.WithRefresh(true)
The migration is broken without this change. The fleet service token doesn't have permissions for refresh.
The service token probably needs to have permissions for index refresh added.
There was a problem hiding this comment.
Probably should comment it out with a warning rather than just delete.
There was a problem hiding this comment.
yeah, will put this back if we agree to add "maintenance" permissions to the fleet-server token.
will test and add ES PR link here as a prereq.
|
Will do another pass tomorrow and change this from draft to PR. |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
1969f58 to
1006f0b
Compare
| client.UpdateByQuery.WithBody(reader), | ||
| client.UpdateByQuery.WithContext(ctx), | ||
| client.UpdateByQuery.WithRefresh(true), | ||
| client.UpdateByQuery.WithConflicts("proceed"), |
There was a problem hiding this comment.
Probably should comment it out with a warning rather than just delete.
|
Created PR for Elasticsearch elastic/elasticsearch#82125. It looks like the This seems to be a bug on Elasticsearch side. If it gets fixed it can break fleet server unless we add the permission that allows fleet server |
This PR will fail in CI for now until the Elasticsearch image with the permissions change is published and picked up for our integration tests. |
0db444e to
c3cfd0f
Compare
…1039) (#1058) * Adjust integration tests to make them work with fleet service token. * Remove .fleet-* mapping cruft. Test rely on .fleet indices plugin to bootstrap indices/datastreams appropriately. * Update integration tests setup to use the token for setup (cherry picked from commit aead51b) Co-authored-by: Aleksandr Maus <aleksandr.maus@elastic.co> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

What is the problem this PR solves?
Revamp integration tests to support the username/password removal.
Addresses: #1020
How does this PR solve the problem?
Use username/password auth only for bulker integration tests and for the test setup where we need elevated permissions to be able to do perform indices setup with
refreshoption, in order to ensure the correct state of the index/datastream before the integration testHere is the list of all the changes:
-p 1test option. This is needed now since the tests in different packages can use shared .fleet-* indicesrefreshoptions from migration query. The fleet service token doesn't have permissions forrefreshoperations.Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Related issues