Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving all system test scripts in system_tests/. #1463

Merged
merged 1 commit into from
Feb 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include README.rst
graft gcloud
global-exclude *.pyc
recursive-exclude system_tests *
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[nosetests]
ignore-files = run_system_test\.py
exclude-dir = system_tests

[bdist_wheel]
universal = 1
13 changes: 0 additions & 13 deletions system_tests/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
import subprocess
import sys

from run_system_test import run_module_tests


MODULES = (
'datastore',
'storage',
Expand Down Expand Up @@ -102,9 +105,6 @@ def prepare_to_run():
def main():
"""Run all the system tests if necessary."""
prepare_to_run()

sys.path.append(ROOT_DIR)
from system_tests.run_system_test import run_module_tests
for module in MODULES:
run_module_tests(module)

Expand Down
6 changes: 3 additions & 3 deletions system_tests/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
from gcloud.exceptions import Conflict
# This assumes the command is being run via tox hence the
# repository root is the current directory.
from system_tests import clear_datastore
from system_tests import populate_datastore
from system_tests.system_test_utils import EmulatorCreds
import clear_datastore
import populate_datastore
from system_test_utils import EmulatorCreds


class Config(object):
Expand Down
2 changes: 1 addition & 1 deletion system_tests/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from gcloud.environment_vars import PUBSUB_EMULATOR
from gcloud.environment_vars import TESTS_PROJECT
from gcloud import pubsub
from system_tests.system_test_utils import EmulatorCreds
from system_test_utils import EmulatorCreds


DEFAULT_TOPIC_NAME = 'subscribe-me%d' % (1000 * time.time(),)
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_emulator.py → system_tests/run_emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from gcloud.environment_vars import GCD_DATASET
from gcloud.environment_vars import GCD_HOST
from gcloud.environment_vars import PUBSUB_EMULATOR
from system_tests.run_system_test import run_module_tests
from run_system_test import run_module_tests


PACKAGE_INFO = {
Expand Down
10 changes: 5 additions & 5 deletions system_tests/run_system_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

# This assumes the command is being run via tox hence the
# repository root is the current directory.
from system_tests import bigquery
from system_tests import datastore
from system_tests import pubsub
from system_tests import storage
from system_tests import system_test_utils
import bigquery
import datastore
import pubsub
import storage
import system_test_utils


REQUIREMENTS = {
Expand Down
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ commands =
nosetests
deps =
nose
nose-exclude
unittest2
setenv =
PYTHONPATH = {toxinidir}/_testing
covercmd =
nosetests \
--ignore-files=run_system_test\.py \
--exclude-dir=system_tests \
--with-coverage \
--cover-package=gcloud \
--cover-erase \
Expand Down Expand Up @@ -84,21 +85,21 @@ passenv = {[testenv:system-tests]passenv}
basepython =
python2.7
commands =
python {toxinidir}/scripts/attempt_system_tests.py
python {toxinidir}/system_tests/attempt_system_tests.py
passenv = GOOGLE_* GCLOUD_* TRAVIS* encrypted_*

[testenv:system-tests3]
basepython =
python3.4
commands =
python {toxinidir}/scripts/attempt_system_tests.py
python {toxinidir}/system_tests/attempt_system_tests.py
passenv = {[testenv:system-tests]passenv}

[testenv:datastore-emulator]
basepython =
python2.7
commands =
python {toxinidir}/scripts/run_emulator.py --package=datastore
python {toxinidir}/system_tests/run_emulator.py --package=datastore
setenv =
PYTHONPATH = {toxinidir}/_testing
GCLOUD_NO_PRINT=true
Expand All @@ -110,6 +111,6 @@ deps =
basepython =
python2.7
commands =
python {toxinidir}/scripts/run_emulator.py --package=pubsub
python {toxinidir}/system_tests/run_emulator.py --package=pubsub
passenv = GCLOUD_*
deps = {[testenv:datastore-emulator]deps}