Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit 6ccc4a4

Browse files
author
Takashi Matsuo
authored
testing: start using btlr [(#3959)](GoogleCloudPlatform/python-docs-samples#3959)
* testing: start using btlr The binary is at gs://cloud-devrel-kokoro-resources/btlr/v0.0.1/btlr * add period after DIFF_FROM * use array for btlr args * fix websocket tests * add debug message * wait longer for the server to spin up * dlp: bump the wait timeout to 10 minutes * [run] copy noxfile.py to child directory to avoid gcloud issue * [iam] fix: only display description when the key exists * use uuid4 instead of uuid1 * [iot] testing: use the same format for registry id * Stop asserting Out of memory not in the output * fix missing imports * [dns] testing: more retries with delay * [dlp] testing: longer timeout * use the max-concurrency flag * use 30 workers * [monitoring] use multiple projects * [dlp] testing: longer timeout
1 parent 03c2c01 commit 6ccc4a4

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed

samples/snippets/v3/cloud-client/README.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ This directory contains samples for Google Stackdriver Monitoring API. Stackdriv
1616

1717
.. _Google Stackdriver Monitoring API: https://cloud.google.com/monitoring/docs/
1818

19+
To run the sample, you need to enable the API at: https://console.cloud.google.com/apis/library/monitoring.googleapis.com
20+
21+
To run the sample, you need to have `Monitoring Admin` role.
22+
23+
24+
Please visit [the Cloud Console UI of this API](https://console.cloud.google.com/monitoring) and create a new Workspace with the same name of your Cloud project.
25+
26+
1927
Setup
2028
-------------------------------------------------------------------------------
2129

samples/snippets/v3/cloud-client/README.rst.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ product:
1212
and many others. Stackdriver ingests that data and generates insights
1313
via dashboards, charts, and alerts.
1414

15+
required_api_url: https://console.cloud.google.com/apis/library/monitoring.googleapis.com
16+
required_role: Monitoring Admin
17+
other_required_steps: >
18+
Please visit [the Cloud Console UI of this
19+
API](https://console.cloud.google.com/monitoring) and create a new
20+
Workspace with the same name of your Cloud project.
21+
1522
setup:
1623
- auth
1724
- install_deps
@@ -25,4 +32,4 @@ samples:
2532

2633
cloud_client_library: true
2734

28-
folder: monitoring/api/v3/cloud-client
35+
folder: monitoring/api/v3/cloud-client
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright 2020 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Default TEST_CONFIG_OVERRIDE for python repos.
16+
17+
# You can copy this file into your directory, then it will be inported from
18+
# the noxfile.py.
19+
20+
# The source of truth:
21+
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py
22+
23+
TEST_CONFIG_OVERRIDE = {
24+
# You can opt out from the test for specific Python versions.
25+
'ignored_versions': ["2.7"],
26+
27+
# Declare optional test sessions you want to opt-in. Currently we
28+
# have the following optional test sessions:
29+
# 'cloud_run' # Test session for Cloud Run application.
30+
'opt_in_sessions': [],
31+
32+
# An envvar key for determining the project id to use. Change it
33+
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
34+
# build specific Cloud project. You can also use your own string
35+
# to use your own Cloud project.
36+
# 'gcloud_project_env': 'GCLOUD_PROJECT',
37+
'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
38+
39+
# A dictionary you want to inject into your test. Don't put any
40+
# secrets here. These values will override predefined values.
41+
'envs': {},
42+
}

0 commit comments

Comments
 (0)