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

fixtures: shared volume path through env variable #66

Conversation

diegodelemos
Copy link
Member

@diegodelemos diegodelemos commented Oct 13, 2020

@diegodelemos diegodelemos force-pushed the rc-217/configurable-shared-volume-path branch from 801c73a to 64d1d7c Compare October 13, 2020 13:11
temp_path = str(tmpdir_factory.mktemp("reana"))
yield temp_path
shutil.rmtree(temp_path)
shared_volume_path = os.getenv("SHARED_VOLUME_PATH", "")
Copy link
Member Author

@diegodelemos diegodelemos Oct 13, 2020

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).

@diegodelemos diegodelemos force-pushed the rc-217/configurable-shared-volume-path branch from 64d1d7c to 8ec4056 Compare October 14, 2020 08:16
"""Create a sample workflow in the database.

Scope: function

Adds a sample serial workflow in the DB.
"""
from reana_db.models import Workflow
Copy link
Member Author

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.

Copy link
Member

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.

Diego Rodriguez added 2 commits October 15, 2020 12:17
* 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.
@diegodelemos diegodelemos force-pushed the rc-217/configurable-shared-volume-path branch from 8ec4056 to 1a83daa Compare October 15, 2020 10:17
Copy link
Member

@mvidalgarcia mvidalgarcia left a 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

@diegodelemos diegodelemos merged commit 1a83daa into reanahub:master Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests: SHARED_VOLUME_PATH not dynamically configurable
2 participants