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

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

Merged
merged 1 commit into from Mar 18, 2016
Merged

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

merged 1 commit into from Mar 18, 2016

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Mar 15, 2016

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 tseaver added the api: logging Issues related to the Cloud Logging API. label Mar 15, 2016
@googlebot 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
Copy link
Contributor Author

tseaver commented Mar 18, 2016

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

"""
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
Copy link
Contributor

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.

This comment was marked as spam.

@tseaver
Copy link
Contributor Author

tseaver commented Mar 18, 2016

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
Copy link
Contributor

dhermes commented Mar 18, 2016

LGTM

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

Add system test for 'Client.list_metrics'.
@tseaver tseaver merged commit 4d21791 into googleapis:logging-api Mar 18, 2016
@tseaver tseaver deleted the logging-system_test-client_list_metrics branch March 18, 2016 17:32
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.

None yet

3 participants