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

New fixture common_init_opts #65

Merged
merged 5 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions datalad_ria/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@

from .tests.fixtures import (
ria_sshserver,
ria_sshserver_setup,
common_ora_init_opts,
)
8 changes: 8 additions & 0 deletions datalad_ria/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,11 @@ def ria_sshserver(ria_sshserver_setup, monkeypatch):
with monkeypatch.context() as m:
m.setenv("DATALAD_SSH_IDENTITYFILE", ria_sshserver_setup['SSH_SECKEY'])
yield ria_baseurl, ria_sshserver_setup['LOCALPATH']


@pytest.fixture(autouse=False, scope="function")
Copy link
Member

Choose a reason for hiding this comment

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

Technically not necessary to be function-scope, could be session-scope (for now), but also fine as-is.

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks. I've kept it as is for now.

def common_ora_init_opts():
"""Return common initialization arguments for the ora special remote"""
common_init_opts = ["encryption=none", "type=external", "externaltype=ora",
"autoenable=true"]
yield common_init_opts
5 changes: 5 additions & 0 deletions datalad_ria/tests/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ def test_riaserver_fixture(ria_sshserver):
# base url and local path
assert len(ria_sshserver) == 2
assert ria_sshserver[0].startswith('ria+ssh://')


def test_common_ora_init_opts_fixture(common_ora_init_opts):
assert "externaltype=ora" in common_ora_init_opts
assert "autoenable=true" in common_ora_init_opts