ibi-group / datatools-server

Server for IBI's GTFS data management platform.
MIT License
49 stars 51 forks source link

Disable auth for tests #555

Closed br648 closed 1 year ago

br648 commented 1 year ago

Checklist

Description

73 exceptions are logged as part of CI for failed authentication. Auth isn't needed for the majority of unit tests, so where the exception is thrown, auth has been disabled. It is re-enabled once the test has completed so as not to impact tests that do require auth.

This PR (where applicable) disables auth which will remove the exceptions logged and speed up testing... a little.

br648 commented 1 year ago

Is there no better place to put all these calls? Feels annoying to have to repeat it so many times

@miles-grant-ibigroup not without a more indepth refactor. Some of the tests require auth so a global update (say in DatatoolsTest.setUp()) is not possible. If I was to do this, I'd have to update all the tests that require auth (to enable it), so I don't think we'd be any further forward.