diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 37686c3ad6200..b4a9f92fd98a4 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -208,13 +208,14 @@ Running System Tests ``datastore`` emulator:: $ tox -e datastore-emulator + $ GOOGLE_CLOUD_DISABLE_GRPC=true tox -e datastore-emulator This also requires that the ``gcloud`` command line tool is installed. If you'd like to run them directly (outside of a ``tox`` environment), first start the emulator and take note of the process ID:: - $ gcloud beta emulators datastore start 2>&1 > log.txt & + $ gcloud beta emulators datastore start --no-legacy 2>&1 > log.txt & [1] 33333 then determine the environment variables needed to interact with diff --git a/system_tests/run_emulator.py b/system_tests/run_emulator.py index 5d946a1aac83f..2a1e5d41a53b1 100644 --- a/system_tests/run_emulator.py +++ b/system_tests/run_emulator.py @@ -35,7 +35,10 @@ 'datastore': (GCD_DATASET, GCD_HOST), 'pubsub': (PUBSUB_EMULATOR,) } -_DS_READY_LINE = '[datastore] INFO: Dev App Server is now running\n' +EXTRA = { + 'datastore': ('--no-legacy',), +} +_DS_READY_LINE = '[datastore] Dev App Server is now running.\n' _PS_READY_LINE_PREFIX = '[pubsub] INFO: Server started, listening on ' @@ -62,7 +65,9 @@ def get_start_command(package): :rtype: tuple :returns: The arguments to be used, in a tuple. """ - return 'gcloud', 'beta', 'emulators', package, 'start' + result = ('gcloud', 'beta', 'emulators', package, 'start') + extra = EXTRA.get(package, ()) + return result + extra def get_env_init_command(package): @@ -74,7 +79,9 @@ def get_env_init_command(package): :rtype: tuple :returns: The arguments to be used, in a tuple. """ - return 'gcloud', 'beta', 'emulators', package, 'env-init' + result = ('gcloud', 'beta', 'emulators', package, 'env-init') + extra = EXTRA.get(package, ()) + return result + extra def datastore_wait_ready(popen): diff --git a/tox.ini b/tox.ini index 5128f71609879..01e473331b59c 100644 --- a/tox.ini +++ b/tox.ini @@ -124,6 +124,8 @@ commands = python {toxinidir}/system_tests/run_emulator.py --package=datastore setenv = GOOGLE_CLOUD_NO_PRINT=true +passenv = + GOOGLE_CLOUD_DISABLE_GRPC deps = {[testenv]deps} psutil