From 6c36bded613efbdc076b7a7bc7b30083e98c4a76 Mon Sep 17 00:00:00 2001 From: CodyCBakerPhD Date: Mon, 1 Jul 2024 14:28:46 -0400 Subject: [PATCH] restore full call and eval --- dockerfiles/rclone_with_config | 2 +- tests/docker_rclone_with_config_cli.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dockerfiles/rclone_with_config b/dockerfiles/rclone_with_config index e92c68d1a..ba4a92935 100644 --- a/dockerfiles/rclone_with_config +++ b/dockerfiles/rclone_with_config @@ -1,5 +1,5 @@ FROM rclone/rclone:latest LABEL org.opencontainers.image.source=https://github.com/catalystneuro/neuroconv LABEL org.opencontainers.image.description="A simple extension of the basic Rclone docker image to automatically create a local .conf file from contents passed via an environment variable." -CMD printf "$RCLONE_CONFIG" > ./rclone.conf && rclone "$RCLONE_COMMANNDS" +CMD printf "$RCLONE_CONFIG" > ./rclone.conf && echo "$RCLONE_COMMANDS" && eval "$RCLONE_COMMANNDS" ENTRYPOINT [""] diff --git a/tests/docker_rclone_with_config_cli.py b/tests/docker_rclone_with_config_cli.py index 5d3ac558d..f8d93cfc9 100644 --- a/tests/docker_rclone_with_config_cli.py +++ b/tests/docker_rclone_with_config_cli.py @@ -56,13 +56,13 @@ def setUp(self): with open(file=self.test_config_file, mode="w") as io: io.writelines(rclone_config_contents) - def test_rclone_with_config(self): + def test_direct_usage_of_rclone_with_config(self): with open(file=self.test_config_file, mode="r") as io: rclone_config_file_stream = io.read() os.environ["RCLONE_CONFIG"] = rclone_config_file_stream os.environ["RCLONE_COMMAND"] = ( - f"copy test_google_drive_remote:testing_rclone_with_config {self.test_folder} --verbose --progress" + f"rclone copy test_google_drive_remote:testing_rclone_with_config {self.test_folder} --verbose --progress" ) output = deploy_process( @@ -91,3 +91,6 @@ def test_rclone_with_config(self): assert ( file_content == "This is a test file for the Rclone (with config) docker image hosted on NeuroConv!" ), "The file content does not match expectations!" + + def test_helper_function(self): + pass # TODO