catalyst / moodle-tool_objectfs

Object file storage system for Moodle
https://moodle.org/plugins/tool_objectfs
88 stars 72 forks source link

WIP check api #592

Open matthewhilton opened 10 months ago

matthewhilton commented 10 months ago

A work in progress update to add some basic checks to objectfs - related to #480

Basically the idea is to expose the current methods we have available in object_client via the check api https://moodledev.io/docs/apis/subsystems/check

  1. test_permissions
  2. test_connection
  3. test_range_request

As well as add a new method:

  1. test_configuration to detect any config level problems e.g. missing keys, missing config, etc...

1,2,3 are basically the same code, just calling a different method, so these share a check API class. 3. is only enabled if range requests are enabled.

4 is special since it runs only if the $CFG->alternative_file_system is set, whereas 1,2,3 only run if the configuration is OK (i.e. 4 is passing)

Note this only targets MOODLE_310_STABLE since lower versions (< 3.9) do not have the check API.

TODO