Skip to content

Commit e44bacb

Browse files
author
Takashi Matsuo
authored
[iam] testing: use multiple projects (#3772)
* [iam] testing: use multiple projects part of #3310 * change required roles
1 parent a16afe8 commit e44bacb

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

iam/api-client/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
IAM API Python Samples
3+
======================
4+
5+
6+
To run the sample, you need to have `Role Administrator`, `Security
7+
Admin`, and `Service Account Admin` role.

iam/api-client/noxfile_config.py

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)