Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test if plugin errors from tests are unique #2372

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

Famlam
Copy link
Collaborator

@Famlam Famlam commented Oct 28, 2024

Extends the check_err function of the plugin tests to also verify that an error is unique. Since plugin-errors are by definition on a per-OSM-object basis, it only needs to ensure there's a unique combination of class+subclass.

It would of course only catch situations that are actually checked with check_err, but every bit of safety is better than a frontend crash due to a duplicate entry :). For regular (Osmosis) analysers with test cases, such a test already exists.


An example case would for instance be if someone would replace the set(...) of TagFix_Access by list(...), after which this test line would throw two equal errors for bad value nope. Obviously that's just a hypothetical case :)

@frodrigo frodrigo merged commit 834f2e1 into dev Oct 29, 2024
6 checks passed
@Famlam Famlam deleted the famlam-unique-error-plugin branch October 29, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants