[o365] add agent replacement script test#19457
Open
kcreddy wants to merge 3 commits into
Open
Conversation
Verify that destroying and re-enrolling the agent does not lose events. The new agent has no cursor state and re-collects from initial_interval; fingerprint dedup on o365audit.Id prevents duplicates. New blobs that appeared during the outage are picked up.
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
|
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
efd6
reviewed
Jun 16, 2026
Comment on lines
+1
to
+2
| # Test that replacing the agent (full re-enrollment, no cursor carried over) | ||
| # does not lose events. |
Contributor
There was a problem hiding this comment.
I don't think this test does this; specifically, it is incapable of detecting whether the four events from the first phase were not lost.
In order to do this I'd suggest having six events in the first phase, and then six events in the second phase (four of them shared with the first), and then confirming that the final state has eight events.
Phase 1: {sp,gen}-event-{001,002,003}: 6 events
Phase 2: {sp,gen}-event-{002,003,004}: 6 events (001 gone, 004 new)
Expected total: 8 distinct events
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.
Proposed commit message
Note
Test only - no changelog needed.
Checklist
changelog.ymlfile.How to test this PR locally
New script test runs successfully.