Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dca74b0

Browse filesBrowse files
committed
Merge pull request #954 from dhermes/rename-regression
Renaming regression tests to system tests.
2 parents 7dece69 + 0716cc3 commit dca74b0
Copy full SHA for dca74b0
Expand file treeCollapse file tree

24 files changed

+49
-49
lines changed

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ docs/_build
4343
env/
4444
coverage.xml
4545

46-
# Regression test environment variables.
47-
regression/local_test_setup
46+
# System test environment variables.
47+
system_tests/local_test_setup
4848

4949
# Make sure a generated file isn't accidentally committed.
5050
pylintrc_reduced

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ script:
1414
- tox -e py27
1515
- tox -e py34
1616
- tox -e lint
17-
- tox -e regression
18-
- tox -e regression3
17+
- tox -e system-tests
18+
- tox -e system-tests3
1919
- scripts/merge.sh
2020

2121
after_success:

‎CONTRIBUTING.rst

Copy file name to clipboardExpand all lines: CONTRIBUTING.rst
+16-16Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,22 @@ Running Tests
141141
$ cd ~/hack-on-gcloud/
142142
$ /usr/bin/tox
143143

144-
Running Regression Tests
145-
------------------------
144+
Running System Tests
145+
--------------------
146146

147-
- To run regression tests you can execute::
147+
- To run system tests you can execute::
148148

149-
$ tox -e regression
149+
$ tox -e system-tests
150150

151-
or run only regression tests for a particular package via::
151+
or run only system tests for a particular package via::
152152

153-
$ python regression/run_regression.py --package {package}
153+
$ python system_tests/run_system_test.py --package {package}
154154

155155
This alone will not run the tests. You'll need to change some local
156156
auth settings and change some configuration in your project to
157157
run all the tests.
158158

159-
- Regression tests will be run against an actual project and
159+
- System tests will be run against an actual project and
160160
so you'll need to provide some environment variables to facilitate
161161
authentication to your project:
162162

@@ -165,17 +165,17 @@ Running Regression Tests
165165
- ``GCLOUD_TESTS_DATASET_ID``: The name of the dataset your tests connect to.
166166
This is typically the same as ``GCLOUD_TESTS_PROJECT_ID``.
167167
- ``GOOGLE_APPLICATION_CREDENTIALS``: The path to a JSON key file;
168-
see ``regression/app_credentials.json.sample`` as an example. Such a file
168+
see ``system_tests/app_credentials.json.sample`` as an example. Such a file
169169
can be downloaded directly from the developer's console by clicking
170170
"Generate new JSON key". See private key
171171
`docs <https://cloud.google.com/storage/docs/authentication#generating-a-private-key>`__
172172
for more details.
173173

174-
- Examples of these can be found in ``regression/local_test_setup.sample``. We
175-
recommend copying this to ``regression/local_test_setup``, editing the values
176-
and sourcing them into your environment::
174+
- Examples of these can be found in ``system_tests/local_test_setup.sample``. We
175+
recommend copying this to ``system_tests/local_test_setup``, editing the
176+
values and sourcing them into your environment::
177177

178-
$ source regression/local_test_setup
178+
$ source system_tests/local_test_setup
179179

180180
- For datastore tests, you'll need to create composite
181181
`indexes <https://cloud.google.com/datastore/docs/tools/indexconfig>`__
@@ -196,7 +196,7 @@ Running Regression Tests
196196
> --key-file=$P12_CREDENTIALS_FILE
197197

198198
# Create the indexes
199-
$ gcloud preview datastore create-indexes regression/data/ \
199+
$ gcloud preview datastore create-indexes system_tests/data/ \
200200
> --project=$GCLOUD_TESTS_DATASET_ID
201201

202202
# Restore your environment to its previous state.
@@ -205,13 +205,13 @@ Running Regression Tests
205205
- For datastore query tests, you'll need stored data in your dataset.
206206
To populate this data, run::
207207

208-
$ python regression/populate_datastore.py
208+
$ python system_tests/populate_datastore.py
209209

210210
- If you make a mistake during development (i.e. a failing test that
211-
prevents clean-up) you can clear all regression data from your
211+
prevents clean-up) you can clear all system test data from your
212212
datastore instance via::
213213

214-
$ python regression/clear_datastore.py
214+
$ python system_tests/clear_datastore.py
215215

216216
Test Coverage
217217
-------------

‎docs/_components/datastore-quickstart.rst

Copy file name to clipboardExpand all lines: docs/_components/datastore-quickstart.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ authentication to your project:
2323
- ``GCLOUD_TESTS_DATASET_ID``: The name of the dataset your tests connect to.
2424
This is typically the same as ``GCLOUD_TESTS_PROJECT_ID``.
2525
- ``GOOGLE_APPLICATION_CREDENTIALS``: The path to a JSON key file;
26-
see ``regression/app_credentials.json.sample`` as an example. Such a file
26+
see ``system_tests/app_credentials.json.sample`` as an example. Such a file
2727
can be downloaded directly from the developer's console by clicking
2828
"Generate new JSON key". See private key
2929
`docs <https://cloud.google.com/storage/docs/authentication#generating-a-private-key>`__

‎docs/_components/storage-quickstart.rst

Copy file name to clipboardExpand all lines: docs/_components/storage-quickstart.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ authentication to your project:
2323
- ``GCLOUD_TESTS_DATASET_ID``: The name of the dataset your tests connect to.
2424
This is typically the same as ``GCLOUD_TESTS_PROJECT_ID``.
2525
- ``GOOGLE_APPLICATION_CREDENTIALS``: The path to a JSON key file;
26-
see ``regression/app_credentials.json.sample`` as an example. Such a file
26+
see ``system_tests/app_credentials.json.sample`` as an example. Such a file
2727
can be downloaded directly from the developer's console by clicking
2828
"Generate new JSON key". See private key
2929
`docs <https://cloud.google.com/storage/docs/authentication#generating-a-private-key>`__

‎run_pylint.py

Copy file name to clipboardExpand all lines: run_pylint.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ def is_production_filename(filename):
103103
:rtype: boolean
104104
:returns: Boolean indicating production status.
105105
"""
106-
return not ('demo' in filename or 'test' in filename or
107-
filename.startswith('regression'))
106+
return not ('demo' in filename or 'test' in filename)
108107

109108

110109
def get_files_for_linting(allow_limited=True):

‎scripts/cover.sh

Copy file name to clipboardExpand all lines: scripts/cover.sh
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616

1717
set -ev
1818

19-
nosetests --with-xunit --with-xcoverage --cover-package=gcloud \
19+
nosetests --ignore-files=run_system_test\.py \
20+
--with-xunit --with-xcoverage --cover-package=gcloud \
2021
--nocapture --cover-erase --cover-tests --cover-branches ${@}

‎scripts/run_regression.sh renamed to ‎scripts/run_system_tests.sh

Copy file name to clipboardExpand all lines: scripts/run_system_tests.sh
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ set -ev
1818

1919
# If we're on Travis, we need to set up the environment.
2020
if [[ "${TRAVIS}" == "true" ]]; then
21-
# If merging to master and not a pull request, run regression test.
21+
# If merging to master and not a pull request, run system test.
2222
if [[ "${TRAVIS_BRANCH}" == "master" ]] && \
2323
[[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
2424
echo "Running in Travis during merge, decrypting stored key file."
2525

2626
# Convert encrypted key file into decrypted file to be used.
2727
openssl aes-256-cbc -K $encrypted_a1b222e8c14d_key \
2828
-iv $encrypted_a1b222e8c14d_iv \
29-
-in regression/key.json.enc \
29+
-in system_tests/key.json.enc \
3030
-out $GOOGLE_APPLICATION_CREDENTIALS -d
3131
else
3232
echo "Running in Travis during non-merge to master, doing nothing."
3333
exit
3434
fi
3535
fi
3636

37-
# Run the regression tests for each tested package.
38-
python regression/run_regression.py --package datastore
39-
python regression/run_regression.py --package storage
40-
python regression/run_regression.py --package pubsub
37+
# Run the system tests for each tested package.
38+
python system_tests/run_system_test.py --package datastore
39+
python system_tests/run_system_test.py --package storage
40+
python system_tests/run_system_test.py --package pubsub
File renamed without changes.

‎regression/clear_datastore.py renamed to ‎system_tests/clear_datastore.py

Copy file name to clipboardExpand all lines: system_tests/clear_datastore.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""Script to populate datastore with regression test data."""
15+
"""Script to populate datastore with system test data."""
1616

1717
from six.moves import input
1818

File renamed without changes.
File renamed without changes.

‎regression/datastore.py renamed to ‎system_tests/datastore.py

Copy file name to clipboardExpand all lines: system_tests/datastore.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from gcloud.datastore import _implicit_environ
2121
# This assumes the command is being run via tox hence the
2222
# repository root is the current directory.
23-
from regression import populate_datastore
23+
from system_tests import populate_datastore
2424

2525

2626
_implicit_environ._DATASET_ENV_VAR_NAME = 'GCLOUD_TESTS_DATASET_ID'
File renamed without changes.

‎regression/populate_datastore.py renamed to ‎system_tests/populate_datastore.py

Copy file name to clipboardExpand all lines: system_tests/populate_datastore.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""Script to populate datastore with regression test data."""
15+
"""Script to populate datastore with system test data."""
1616

1717
from six.moves import zip
1818

File renamed without changes.

‎regression/run_regression.py renamed to ‎system_tests/run_system_test.py

Copy file name to clipboardExpand all lines: system_tests/run_system_test.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
# This assumes the command is being run via tox hence the
2020
# repository root is the current directory.
21-
from regression import regression_utils
21+
from system_tests import system_test_utils
2222

2323

2424
def get_parser():
@@ -42,9 +42,9 @@ def main():
4242
args = parser.parse_args()
4343
# Make sure environ is set before running test.
4444
if args.package == 'datastore':
45-
regression_utils.check_environ(require_datastore=True)
45+
system_test_utils.check_environ(require_datastore=True)
4646
elif args.package == 'storage':
47-
regression_utils.check_environ(require_storage=True)
47+
system_test_utils.check_environ(require_storage=True)
4848
test_result = run_module_tests(args.package)
4949
if not test_result.wasSuccessful():
5050
sys.exit(1)

‎regression/storage.py renamed to ‎system_tests/storage.py

Copy file name to clipboardExpand all lines: system_tests/storage.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ class TestStorageFiles(unittest2.TestCase):
8484

8585
FILES = {
8686
'logo': {
87-
'path': 'regression/data/CloudPlatform_128px_Retina.png',
87+
'path': 'system_tests/data/CloudPlatform_128px_Retina.png',
8888
},
8989
'big': {
90-
'path': 'regression/data/five-point-one-mb-file.zip',
90+
'path': 'system_tests/data/five-point-one-mb-file.zip',
9191
},
9292
'simple': {
93-
'path': 'regression/data/simple.txt',
93+
'path': 'system_tests/data/simple.txt',
9494
}
9595
}
9696

‎regression/regression_utils.py renamed to ‎system_tests/system_test_utils.py

Copy file name to clipboardExpand all lines: system_tests/system_test_utils.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
CREDENTIALS = os.getenv('GOOGLE_APPLICATION_CREDENTIALS')
2424

2525
ENVIRON_ERROR_MSG = """\
26-
To run the regression tests, you need to set some environment variables.
26+
To run the system tests, you need to set some environment variables.
2727
Please check the Contributing guide for instructions.
2828
"""
2929

‎tox.ini

Copy file name to clipboardExpand all lines: tox.ini
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ envlist =
66
install_command =
77
{toxinidir}/scripts/custom_pip_install.sh {opts} {packages}
88
commands =
9-
nosetests
9+
nosetests --ignore-files=run_system_test\.py
1010
deps =
1111
nose
1212
unittest2
@@ -30,7 +30,7 @@ commands =
3030
deps =
3131
{[testenv:cover]deps}
3232
coveralls
33-
passenv = {[testenv:regression]passenv}
33+
passenv = {[testenv:system-tests]passenv}
3434

3535
[testenv:docs]
3636
basepython =
@@ -56,18 +56,18 @@ deps =
5656
-ehg+https://bitbucket.org/logilab/pylint#egg=pylint
5757
unittest2
5858
protobuf==3.0.0-alpha-1
59-
passenv = {[testenv:regression]passenv}
59+
passenv = {[testenv:system-tests]passenv}
6060

61-
[testenv:regression]
61+
[testenv:system-tests]
6262
basepython =
6363
python2.7
6464
commands =
65-
{toxinidir}/scripts/run_regression.sh
65+
{toxinidir}/scripts/run_system_tests.sh
6666
passenv = GOOGLE_* GCLOUD_* TRAVIS* encrypted_*
6767

68-
[testenv:regression3]
68+
[testenv:system-tests3]
6969
basepython =
7070
python3.4
7171
commands =
72-
{toxinidir}/scripts/run_regression.sh
73-
passenv = {[testenv:regression]passenv}
72+
{toxinidir}/scripts/run_system_tests.sh
73+
passenv = {[testenv:system-tests]passenv}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.