anthology-ally / moodle-tool_ally

1 stars 16 forks source link

Failing PHPUnit test due to missing token string #96

Closed opitz closed 3 months ago

opitz commented 4 months ago

When running PHPUnit tests with MOODLE_403_STABLE an error is shown:

`Undefined property: stdClass::$token

in tool_ally\local_file::generate_wspluginfile_signature called at /var/www/site/admin/tool/ally/classes/local_file.php (194) in tool_ally\local_file::webservice_url called at /var/www/site/admin/tool/ally/classes/webservice/file.php (126) in tool_ally\webservice\file::execute_service called at ? (?) in call_user_func_array called at /var/www/site/admin/tool/ally/classes/webservice/loggable_external_api.php (57) in tool_ally\webservice\loggable_external_api::service called at ? (?) in call_user_func_array called at /var/www/site/webservice/lib.php (1504) in webservice_base_server::execute called at /var/www/site/webservice/lib.php (1350) in webservice_base_server::run called at /var/www/site/webservice/rest/server.php (44)`

I think this is because during the test a valid token record is returned but no token string is set.

aspark21 commented 4 months ago

this wasn't from PHPUnit tests but from calls in production. Very noisy in our error logs