FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add system test for 'Client.list_metrics'. by tseaver · Pull Request #1611 · googleapis/google-cloud-python · GitHub

Add system test for 'Client.list_metrics'. - #1611

Merged
tseaver merged 1 commit into
googleapis:logging-apifrom
tseaver:logging-system_test-client_list_metrics
Mar 18, 2016
Merged

Add system test for 'Client.list_metrics'.#1611
tseaver merged 1 commit into
googleapis:logging-apifrom
tseaver:logging-system_test-client_list_metrics

Conversation

tseaver commented Mar 15, 2016

Copy link
Copy Markdown
Contributor

Uses #1610 as a base.

Note the changes to gcloud.logging: the system test revealed that the API returns "simple" names for the LogMetric resource (as documented, but which I misread as returning fully-qualified paths).

tseaver added the api: logging Issues related to the Cloud Logging API. label Mar 15, 2016
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 15, 2016
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

Copy link
Copy Markdown
Contributor Author

@dhermes Rebased after merging #1610 to the logging-api branch. PTAL

Comment thread gcloud/logging/metric.py
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.

This comment was marked as spam.

dhermes commented Mar 18, 2016

Copy link
Copy Markdown
Contributor

Side question: Can we turn these on to run in Travis?

Comment thread system_tests/logging_.py
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.

This comment was marked as spam.

tseaver commented Mar 18, 2016

Copy link
Copy Markdown
Contributor Author

Side question: Can we turn these on to run in Travis?

The Sink tests (only #1628, at present) are the ones which will need the Owner role for the project. The others should work fine.

dhermes commented Mar 18, 2016

Copy link
Copy Markdown
Contributor

LGTM

tseaver added a commit that referenced this pull request Mar 18, 2016
…_metrics

Add system test for 'Client.list_metrics'.
tseaver merged commit 4d21791 into googleapis:logging-api Mar 18, 2016
tseaver deleted the logging-system_test-client_list_metrics branch March 18, 2016 17:32
parthea pushed a commit that referenced this pull request Nov 26, 2025
parthea pushed a commit that referenced this pull request Mar 6, 2026
…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>
parthea pushed a commit that referenced this pull request Mar 9, 2026
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 🦕
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: logging Issues related to the Cloud Logging API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL