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

Add nox target for django tests #474

Closed
c24t opened this issue Aug 28, 2020 · 1 comment · Fixed by #610
Closed

Add nox target for django tests #474

c24t opened this issue Aug 28, 2020 · 1 comment · Fixed by #610
Assignees
Labels
api: spanner Issues related to the googleapis/python-spanner-django API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: process A process-related concern. May include testing, release, or the like.

Comments

@c24t
Copy link
Contributor

c24t commented Aug 28, 2020

Right now we run django's built in tests in CI using python runtests.py, but it looks like pip-installing django doesn't give us an executable runtests.py without us changing PYTHONPATH.

Kokoro seems to get around this by installing django from source, from @timgraham's fork:

mkdir -p $DJANGO_TESTS_DIR && git clone --depth 1 --single-branch --branch spanner-2.2.x https://github.com/timgraham/django.git $DJANGO_TESTS_DIR/django

Running the existing tox target (from 11222db) doesn't appear to work:

.../python-spanner-django/.tox/py37-django22/bin/python: can't open file 'runtests.py': [Errno 2] No such file or directory
ERROR: InvocationError for command .../python-spanner-django/.tox/py37-django22/bin/python runtests.py (exited with code 2)
ERROR:   py37-django22: commands failed

Since @mf2199 replaced tox with nox in #468, we need a nox target to run the built-in django tests. This target shouldn't depend on kokoro scripts (like django_test_suite.sh does now), and the existing scripts should be changed to remove dependencies on the fork if possible.

See also #471.

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner-django API. label Aug 28, 2020
@c24t c24t added the priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. label Aug 28, 2020
@mf2199 mf2199 added the type: process A process-related concern. May include testing, release, or the like. label Aug 31, 2020
@vi3k6i5 vi3k6i5 linked a pull request May 4, 2021 that will close this issue
@vi3k6i5
Copy link
Contributor

vi3k6i5 commented May 4, 2021

Added in #610

@vi3k6i5 vi3k6i5 closed this as completed May 4, 2021
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. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants