-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add system test for 'Client.list_metrics'. #1611
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.
""" | ||
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
The |
LGTM |
…_metrics Add system test for 'Client.list_metrics'.
Uses #1610 as a base.Note the changes to
gcloud.logging
: the system test revealed that the API returns "simple" names for theLogMetric
resource (as documented, but which I misread as returning fully-qualified paths).