Skip to content

Commit

Permalink
CF Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
N-o-Z committed Dec 5, 2023
1 parent 1e956f8 commit ff87133
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion clients/python-wrapper/lakefs/import_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def prefix(self, object_store_uri: str, destination: str) -> ImportManager:
:param destination: The destination prefix relative to the branch
:return: The ImportManager instance (self) after update, to allow operations chaining
"""
self._append_source(lakefs_sdk.ImportLocation(type=_COMMON_PREFIX, path=object_store_uri, destination=destination))
self._append_source(lakefs_sdk.ImportLocation(type=_COMMON_PREFIX,
path=object_store_uri,
destination=destination))
return self

def object(self, object_store_uri: str, destination: str) -> ImportManager:
Expand Down
4 changes: 2 additions & 2 deletions clients/python-wrapper/tests/integration/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from lakefs import Client
from lakefs.client import Client
from lakefs.exceptions import ImportManagerException, ConflictException
from tests.utests.common import expect_exception_context

Expand Down Expand Up @@ -92,4 +92,4 @@ def test_import_manager_cancel(setup_repo):
assert branch.commit_message() == expected_commit_message
assert not status.completed
assert "Canceled" in status.error.message
assert len(mgr.sources) == 0
assert len(mgr.sources) == 1
5 changes: 2 additions & 3 deletions clients/python-wrapper/tests/utests/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,5 @@ def monkey_import_status(*_, **__):
assert res.completed
assert requests == 0

# try again and expect error
with expect_exception_context(ImportManagerException):
mgr.wait()
# try again and expect no error
mgr.wait()

0 comments on commit ff87133

Please sign in to comment.