Skip to content

Commit

Permalink
changed how we import user config
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Matsuo committed May 8, 2020
1 parent f059b69 commit ddcf26a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 302 deletions.
297 changes: 0 additions & 297 deletions monitoring/api/v3/alerts-client/noxfile.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os

# Temporary set BUILD_SPECIFIC_GCLOUD_PROJECT in this file.
os.environ['BUILD_SPECIFIC_GCLOUD_PROJECT'] = 'tmatsuo-test'

# Default TEST_CONFIG_OVERRIDE for python repos.

# You can copy this file into your directory, then it will be injected
Expand Down Expand Up @@ -43,7 +48,7 @@

# An envvar key for determining the build specific project. Normally you
# don't have to modify this.
'build_specific_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT_ENV',
'build_specific_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',

# A dictionary you want to inject into your test. Don't put any
# secrets here. These values will override predefined values.
Expand Down
9 changes: 5 additions & 4 deletions noxfile-template.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@

# An envvar key for determining the build specific project. Normally you
# don't have to modify this.
'build_specific_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT_ENV',
'build_specific_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',

# A dictionary you want to inject into your test. Don't put any
# secrets here. These values will override predefined values.
'envs': {},
}

TEST_CONFIG_OVERRIDE = {}
# Placeholder for inserting USER's TEST_CONFIG_OVERRIDE
# End of user's TEST_CONFIG_OVERRIDE
try:
from test_config import TEST_CONFIG_OVERRIDE
except ImportError:
TEST_CONFIG_OVERRIDE = {}

# Update the TEST_CONFIG with user supplied values.
TEST_CONFIG.update(TEST_CONFIG_OVERRIDE)
Expand Down
File renamed without changes.

0 comments on commit ddcf26a

Please sign in to comment.