Uh oh!
There was an error while loading. Please reload this page.
Add system test for 'Client.list_metrics'. - #1611
Conversation
Adjust 'Metric.from_api_repr' and associated tests to accomodate the fact that the 'LogMetric' resource does not contain a fully-qualified path, but only the simple name.
tseaver
commented
Mar 18, 2016
| from the client. | ||
| """ | ||
| metric_name = _metric_name_from_path(resource['name'], client.project) | ||
| metric_name = resource['name'] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
dhermes
commented
Mar 18, 2016
Side question: Can we turn these on to run in Travis? |
| DEFAULT_METRIC_NAME, DEFAULT_FILTER, DEFAULT_DESCRIPTION) | ||
| self.assertFalse(metric.exists()) | ||
| before_metrics, _ = Config.CLIENT.list_metrics() | ||
| before_names = set(metric.name for metric in before_metrics) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
tseaver
commented
Mar 18, 2016
The |
dhermes
commented
Mar 18, 2016
LGTM |
…_metrics Add system test for 'Client.list_metrics'.
…1611) Source-Link: googleapis/synthtool@d6103f4 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:39f0f3f2be02ef036e297e376fe3b6256775576da8a6ccb1d5eeb80f4c8bf8fb Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
This test is causing failures in CI. Skipping until it can be fixed properly. Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-storage/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) Fixes#1611 🦕
Uses #1610 as a base.Note the changes to
gcloud.logging: the system test revealed that the API returns "simple" names for theLogMetricresource (as documented, but which I misread as returning fully-qualified paths).