Closed matkoniecz closed 12 months ago
Someone just ran the tests, I got emails about it.
Hi,
osmagent-test-allow-everything has resolved a map note you have commented on. The note is near -21.000, 94.000.
More details about the note can be found at https://master.apis.dev.openstreetmap.org/note/24643.
de.westnordost.osmapi.notes.NotesDaoTest.testCommentNoteInsufficientPrivileges(NotesDaoTest.java:106)
Hm well, most of the DAO tests test the API. If a test fails, it is maybe a problem of the API.
In this case, it is tested that the API should return HTTP code 403 if the OAuth token the user is using to comment on a note does not include the permission to write notes. So apparently, it is possible to comment on notes with an OAuth token that does not include permission to write notes.
Regarding readme on test setup: Just executing gradle test
should do. That is standard for all gradle projects, no need to write about it.
Something was fixed upstream and I corrected the other test as this is working as expected.
Not sure whatever it is test bug, missing setup, inverted test (exception is excepted),
gradlew test
being unsupported or something else.de.westnordost.osmapi.notes.NotesDaoTest.testCommentNoteInsufficientPrivileges(NotesDaoTest.java:106)
is also failing.I am just happy that I finally managed to run tests (for some reason I failed to get tests to run using GUIs, it went well with command line), I have not investigated what is exactly going on (I should go to sleep).