Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b759359

Browse files
authored
Merge pull request GoogleCloudPlatform#170 from nkubala/environment_fix
return string instead of bool in integration test sample app env handler
2 parents 4a50266 + 714dcb7 commit b759359

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/integration/server.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,11 @@ def _check_environment():
245245
# for GAE, we'll check the existence env vars set on
246246
# vm:true or env:flex
247247
# if neither exist, assume we're in GKE
248-
return (_APPENGINE_FLEXIBLE_ENV_VM in os.environ or
249-
_APPENGINE_FLEXIBLE_ENV_FLEX in os.environ), 200
248+
environment = "GKE"
249+
if (_APPENGINE_FLEXIBLE_ENV_VM in os.environ or
250+
_APPENGINE_FLEXIBLE_ENV_FLEX in os.environ):
251+
environment = "GAE"
252+
return environment, 200
250253

251254

252255
class ErrorResponse(Exception):

0 commit comments

Comments
 (0)