metrics.yaml support

The metrics.yaml file can be included in a charm to declare the metrics the charm will report. If the file is not present, no metrics will be allowed to be sent from the unit (not even built-in ones).
Why is this in export_test.go ?
It doesn't seem to use anything that can't be done externally to the charm package.