Skip to content

Commit

Permalink
restore full call and eval
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD committed Jul 1, 2024
1 parent 068632f commit 6c36bde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/rclone_with_config
Original file line number Diff line number Diff line change
@@ -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 [""]
7 changes: 5 additions & 2 deletions tests/docker_rclone_with_config_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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

0 comments on commit 6c36bde

Please sign in to comment.