catalyst / moodle-tool_cloudmetrics

Realtime metrics for Moodle
https://moodle.org/plugins/tool_cloudmetrics
GNU General Public License v3.0
0 stars 3 forks source link

Unit test fails in tool_cloudmetrics when implementing custom metrics #169

Closed josepico01 closed 2 months ago

josepico01 commented 4 months ago

tool_cloudmetrics\tool_cloudmetrics_collect_metrics_test::test_execute failed.

The test file is basically measuring time, frequency for the list of metrics received when executing the schedule task \tool_cloudmetrics\task\collect_metrics_task and passing this to a mock class.

Since the task is implementing the manager::get_metrics() function, not only the inbuilt metrics are fetched but also the custom metrics. But, the provider function is hard coding the expected metrics to be only from the inbuilt list.