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

feat: Stage 6 of nox implementation - enabling system tests #480

Merged
merged 6 commits into from Sep 8, 2020

Conversation

mf2199
Copy link
Contributor

@mf2199 mf2199 commented Aug 31, 2020

As suggested in #466 , this represents the last item of the recommended list aimed to implement nox testing automation in multiple steps.

Change list:

  1. Added a copy of a common test_utils package directory;
  2. Added system test session to Nox configuration;
  3. New tests/system/test_system.py template file;
  4. Some updates to to .gitignore file.

A dummy test method inside the template file is necessary to avoid an exit code 5 error, that is when no tests get collected.

Session test log:

nox > Running session system
nox > Creating virtual environment (virtualenv) using python.exe in .nox\system
nox > pip install mock pytest
nox > pip install -e .
nox > pip install -e test_utils
nox > py.test --quiet tests\system
.                                                                                                                                                                                                                                [100%]
1 passed in 0.03s
nox > Session system was successful.

Towards #474.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 31, 2020
@mf2199 mf2199 changed the title feat: Stage 5 of nox implementation - enabling system tests feat: Stage 6 of nox implementation - enabling system tests Aug 31, 2020
@mf2199 mf2199 added api: spanner Issues related to the googleapis/python-spanner-django API. type: process A process-related concern. May include testing, release, or the like. labels Aug 31, 2020
@mf2199 mf2199 marked this pull request as ready for review August 31, 2020 22:01
@mf2199 mf2199 requested a review from c24t August 31, 2020 22:01
@AVaksman AVaksman added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 3, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 3, 2020
noxfile.py Outdated
# virtualenv's dist-packages.
session.install("mock", "pytest")
session.install("-e", ".")
session.install("-e", "test_utils")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If any of the system tests need the contents of test_utils, you can install it through pip.

It might not be necessary though (there's not too much in it (https://github.com/googleapis/python-test-utils/tree/master/test_utils) at this point.

pip install google-cloud-testutils

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@busunkim96 👍 Agreed. This way used to be prevalent across other products and still exists in Spanner, Bigtable, and possibly some others. Would it be a good idea to update those as well?

noxfile.py Outdated Show resolved Hide resolved
@c24t c24t merged commit 94ba284 into googleapis:master Sep 8, 2020
c24t pushed a commit that referenced this pull request Sep 15, 2020
Add googleapis/python-test-utils and system test stub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner-django API. cla: yes This human has signed the Contributor License Agreement. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants