Test LogReader scenarios for auto_source #32443
Open
+130
−1
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.
for #31223
no logs available -> should error for all query types: test fail for all query types.
rlogs not available, but qlogs are -> should error with /r, pass with /q and /a: test pass for /q, but fail for /r and /a.
rlogs only available for specific segments, but qlogs are available for the rest -> should error with /r, pass with /a: pass with /r, error with /a.
rlog not available on comma api, but is available from another source (openpilot ci bucket, commaCarSegments), rlogs should be parsed: test return comma_api, where is not available rlog.
I wrote a few tests for auto_source, just to make sure this is a good approach. As you can see, I have deviations from the expected results in several cases. In that case, is it necessary to modify the auto_source function, or is a different approach to the test needed?
For the case where rlog is not available on the comma api, the test just checks the return from auto_source. Can you explain what you mean by rlogs should be parsed? If the return from auto_source is rlog on the comma api, where is not available, rlogs should be parsed?