Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test fails in tool_cloudmetrics when implementing custom metrics #169

Closed
josepico01 opened this issue Apr 16, 2024 · 0 comments
Closed

Comments

@josepico01
Copy link
Contributor

josepico01 commented Apr 16, 2024

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.

josepico01 added a commit to josepico01/moodle-tool_cloudmetrics that referenced this issue Apr 17, 2024
- Since all metrics are enabled by default and data provider was supplied with builtin metrics only, we need to disable those custom metrics before the schedule task is executed.
josepico01 added a commit to josepico01/moodle-tool_cloudmetrics that referenced this issue Apr 22, 2024
…end in the expected data provider.

- Replace qualifiers with imports
- Remove set_enabled(true) since it is not relevant anymore.
- Remove return tag
josepico01 added a commit to josepico01/moodle-tool_cloudmetrics that referenced this issue Apr 22, 2024
josepico01 added a commit to josepico01/moodle-tool_cloudmetrics that referenced this issue Apr 22, 2024
cameron1729 added a commit that referenced this issue Apr 23, 2024
Issue #169: Update unit test  to disable custom metrics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant