dlr-eoc / prosEO

prosEO – A Processing System for Earth Observation Data
GNU General Public License v3.0
14 stars 1 forks source link

All services: Rework JUnit tests to avoid REST API calls and user privilege checks #119

Closed tangobravo62 closed 8 months ago

tangobravo62 commented 3 years ago

Since implementing the role based access model an extensive configuration of user privileges is required to actually exercise the services through their REST APIs. This makes JUnit testing through the APIs cumbersome, and due to the breakup of the database transactions to provide and clean up test data, this was error-prone anyway.

The JUnit tests shall therefore be rewritten so that

Where needed services shall be rewritten to make them testable in this way.

tangobravo62 commented 8 months ago

All unit tests work as expected without external services. Where needed, an internal simulation of external services has been implemented. Issue closed.