A more testable linux version detector #154
Open
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.
Good day everyone, hope this PR finds you well.
When adding support for additional Linux Mint versions, I found the test suite in the project a bit cumbersome to use. While the docker tests are not only incredibly useful, I would say they are the ultimate source of correctness, they do not cover all the cases, notably, Linux Mint have no official images, and they are slow to execute.
For these reasons, I thought the project could benefit from an easier to test solution, especially seeing how some of the existing test cases are currently failing (ubuntu, arch), also, some of the OS versions currently detected by the code are incorrect (eg: recent versions of deepin, zorin, elementary are based on newer base images, AFAIK). I've made no attempts at fixing these cases, the aim for the new code was to give identical output to the old one.
I hope this change will make it easier to add support for further distributions.
I also added 2 docker test cases for Amazon linux, one of them is failing with the same error as the arch linux one.