-
Notifications
You must be signed in to change notification settings - Fork 4
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 simplified Docker Compose support for tests #210
Conversation
ce5901c
to
f527973
Compare
I'm hoping that this will simplify things, but I'd lke some feedback on whether that's actually the case. It works for me and I can get rid of the iRODS wrappers and extra client container. |
Remove the requirement to set up iRODS client wrappers before tests will run. Support both plain CLI and IDEs.
f527973
to
a635321
Compare
This seems better for me as well, it makes setup less complicated and eliminates the errors that occur because of running the tests on a mac. It did take my mac more than 15 minutes to build the docker image on the first run (70% of which was installing python), but after that it was faster than the old setup (possibly due to those mac induced failures). Perhaps mention that the initial run time will be long in the README? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran it on my vm with ubuntu and I got 89 passed tests and 2 skipped:
- s It: tests/test_irods.py::TestDataObject::test_verify_checksum_good - Can have its checksum verified as good
- s It: tests/test_irods.py::TestDataObject::test_verify_checksum_bad - Can have its checksum verified as bad
While installing python 3.12.3, this error appeared but did not affect the build or tests:
Downloading Python-3.12.3.tar.xz...
-> https://www.python.org/ftp/python/3.12.3/Python-3.12.3.tar.xz
Installing Python-3.12.3...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/app/.pyenv/versions/3.12.3/lib/python3.12/ctypes/__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
WARNING: The Python ctypes extension was not compiled. Missing the libffi lib?
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/app/.pyenv/versions/3.12.3/lib/python3.12/sqlite3/__init__.py", line 57, in <module>
from sqlite3.dbapi2 import *
File "/app/.pyenv/versions/3.12.3/lib/python3.12/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/app/.pyenv/versions/3.12.3/lib/python3.12/lzma.py", line 27, in <module>
from _lzma import *
ModuleNotFoundError: No module named '_lzma'
WARNING: The Python lzma extension was not compiled. Missing the lzma lib?
Installed Python-3.12.3 to /app/.pyenv/versions/3.12.3
This is a very useful feature for testing... probably every repository should have a containerised env for tests
The lines like this are warnings which occur because I have not installed some optional development apt packages. We could add these later to make the warnings go away. |
6c91983
to
8483d36
Compare
Remove the requirement to set up iRODS client wrappers before tests will run.
Support both plain CLI and IDEs.
GitHub CI is not using this to run tests, although potentially it could. That would need additional parameters for Docker to select the correct iRODS server and clients, which is currently hard-coded into the
Dockerfile.dev