-
Notifications
You must be signed in to change notification settings - Fork 33
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
fixtures: shared volume path through env variable #66
fixtures: shared volume path through env variable #66
Conversation
801c73a
to
64d1d7c
Compare
temp_path = str(tmpdir_factory.mktemp("reana")) | ||
yield temp_path | ||
shutil.rmtree(temp_path) | ||
shared_volume_path = os.getenv("SHARED_VOLUME_PATH", "") |
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.
See how this is being used in reanahub/reana-workflow-controller#338 (this line).
64d1d7c
to
8ec4056
Compare
"""Create a sample workflow in the database. | ||
|
||
Scope: function | ||
|
||
Adds a sample serial workflow in the DB. | ||
""" | ||
from reana_db.models import Workflow |
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.
Moved REANA-DB imports form global scope to the fixtures to make REANA-Client pass on Python2.7 builds, currently failing because of this.
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 think you're missing Base
import in app
fixture.
* Avoids side effects when importing `pytest-reana` into REANA packages that do not depend on REANA-DB (e.g. REANA-Client) where incompatibilities such as using `f-strings` in REANA-DB and REANA-Client supporting Python2.7 are not compatible at import time.
8ec4056
to
1a83daa
Compare
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.
r-w-c
tests successfully passed locally together with reanahub/reana-commons#218
Closes reanahub/reana-commons#217.