Skip to content
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
19 changes: 8 additions & 11 deletions datashuttle/datashuttle_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -1228,17 +1228,14 @@ def update_config_file(self, **kwargs) -> None:
# For backward compatibility
kwargs["connection_method"] = "local_only"

if (
self.cfg["connection_method"] == "local_only"
and kwargs["connection_method"] != "local_only"
):
# We need to ensure this rclone config is created if it was not created during
# initial set up because the project is local only. The rclone config for local filesystem
# is just a placeholder rclone config file anyway. This is not ideal but the alternative is to search
# for an existing config and create only if it does not exist, which requires calls to
# rclone because its config-saving path is not predictable, and this will be very
# slow and essentially pointless as recreating the config should simply overwrite it.
self._setup_rclone_central_local_filesystem_config()
if (
self.cfg["connection_method"] == "local_only"
and kwargs["connection_method"] != "local_only"
):
# We need to ensure this rclone config is created if it was not created during
# initial set up because the project is local only. It does not matter if the
# RClone config is ever overwritten, it's just a placeholder.
self._setup_rclone_central_local_filesystem_config()

new_cfg = copy.deepcopy(self.cfg)
new_cfg.update(**kwargs)
Expand Down
7 changes: 0 additions & 7 deletions tests/tests_transfers/aws/test_tui_setup_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,6 @@ async def test_aws_connection_setup(

await self.scroll_to_click_pause(pilot, "#setup_aws_ok_button")

assert (
pilot.app.screen.query_one(
"#configs_go_to_project_screen_button"
).visible
is True
)

@pytest.mark.asyncio
async def test_aws_connection_setup_failed(self, central_path_and_project):
"""Test AWS connection setup using an incorrect client secret and check
Expand Down
7 changes: 0 additions & 7 deletions tests/tests_transfers/gdrive/test_tui_setup_gdrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@ async def test_gdrive_connection_setup_without_browser(
pilot, "#setup_gdrive_finish_button"
)

assert (
pilot.app.screen.query_one(
"#configs_go_to_project_screen_button"
).visible
is True
)

@pytest.mark.asyncio
async def test_gdrive_connection_setup_incorrect_config_token(
self, setup_project_paths
Expand Down
Loading