Skip to content

SoundCloud authentication rewrite and initial Kernel tests

Richard Allen requested to merge issue/musica-3416852:main into 1.1.x

Summary

  • The SoundCloud service is now the SoundCloud Auth authentication service, which implements the OAuth procedures.
  • SoundCloud Client service is new. It contains, configures, and provides as a service the Martin1982 OAuth provider for SoundCloud, which is used by the Auth service. Auth implements most of the protocol, Client houses and configures the third-party OAuth package. This ended up reducing the size and readability of the Auth service.
  • I have reviewed and re-written the Auth service in a more functional style using Monads from the widmogrod package for flow control and return values within the service and it's current consumers (service configuration forms).

Testing

  • There are two initial Kernel tests for the SoundCloud Auth service. They also cover the new Client service.
  • There are no initial unit tests, only the Kernel tests, and therefore no coverage for SoundCloud code as of yet.
  • The Kernel tests are against the live production API. This means that while they execute the authentication service as accurately as a production environment, they are subject to rate-limiting. Tests are not executed as part production code, only exclusively as part of PHPUnit which is a separate process.
  • In the near future I'd like to have unit tests using API mocks instead of production APIs that are not subject to rate-limiting, do not use production API credentials, and provide the code coverage that Kernel tests do not. I'm not doing that as part of this merge request as this ticket has been open for a month.
Edited by Richard Allen

Merge request reports

Loading