Test for reset cached pipeline states #1068
Draft
+111
−0
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.
Adds tests to verify that the pipeline reset functionality correctly updates both the pipeline state database and the profile's pipeline range.
Previously, when resetting the pipeline, the pipeline state database was updated but the cached pipeline start and end timestamps in the profile were not. Since the profile is used to determine whether to run the pipeline, this led to issues where the pipeline would not re-run even after being reset (as reported in e-mission/e-mission-docs#1105).
The recent fix implemented by @shankari correctly updates both the pipeline state database and the profile, and these tests verify that functionality found in #1067
Tests Added
Added two test methods to TestPipelineReset:
testResetProfilePipelineRange: Verifies that when reset_user_to_ts is called:
The profile's pipeline_range.end_ts is updated to match the correct timestamp (the enter_ts of the first raw place in the last confirmed place)
After re-running the pipeline, the profile's end_ts is updated
testResetProfilePipelineRangeToStart: Verifies that when reset_user_to_start is called:
Both pipeline_range.start_ts and pipeline_range.end_ts in the profile are correctly set to null
Testing Done
Ran the new tests successfully and verified they properly test the profile update functionality.
awaiting merge of 1067 to fix git history