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

Issue #169: Update unit test to disable custom metrics. #171

Closed josepico01 closed 4 months ago

josepico01 commented 4 months ago
cameron1729 commented 4 months ago

Thanks @josepico01

With this patch, what would happen if a new "built in" metric was added and the execute_provider remained unchanged? I think we'd have the same problem right?

I think a better approach may be to disable all metrics at the beginning of test_execute - and this may have been the original intention because there's a line in the loop that explicitly enables the metric. By doing it this way, all metrics are gauranteed to be disabled, except the ones provided by execute_provider.

What do you think?