Test LogReader scenarios for auto_source
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?
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- the change is something we merge
- include a route or your device' dongle ID if relevant
@jnewb1 Could you check if there is any potential to continue?
@jnewb1 ideally these shouldn't be hard coded. instead can we create a mock http server (example here: https://github.com/commaai/openpilot/blob/master/tools/lib/tests/test_caching.py#L15-L31)
@jnewb1 mock http server is created based on the example and changed hard coded url from the test
This PR has had no activity for 30 days. It will be automatically closed in 7 days if there is no activity.