Skip to content
Snippets Groups Projects
Commit 8deb35eb authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Test: import project container node.

parent 5a183df6
Branches
Tags v0.2.0
No related merge requests found
......@@ -7,7 +7,13 @@ RUN useradd -m -s /bin/bash server
# Test user folders
RUN mkdir -p /mnt/hot_storage/users/cristiano.urban && \
mkdir -p /mnt/hot_storage/users/sara.bertocco && \
mkdir -p /mnt/hot_storage/users/sonia.zorba
mkdir -p /mnt/hot_storage/users/sonia.zorba && \
mkdir -p /mnt/hot_storage/users/ari-l
# Copy files for import test
COPY test_import/testdir/ /mnt/hot_storage/users/ari-l/test_import/testdir/
COPY test_import/testdir-md5sum.txt /mnt/hot_storage/users/ari-l/test_import/
RUN chmod -R 755 /mnt/hot_storage/users/ari-l/test_import
# Set up a workdir for the container
WORKDIR /home/server/
......
1181c1834012245d785120e3505ed169 ./test111.txt
111
348bd3ce10ec00ecc29d31ec97cd5839 ./test222.txt
222
......@@ -68,14 +68,14 @@ class ImportRPCServer(RedisRPCServer):
response = { "responseType": "ERROR",
"errorCode": 5,
"errorMsg": "Directory path expected." }
elif username not in path:
response = { "responseType": "ERROR",
"errorCode": 6,
"errorMsg": "Directory path does not contain the username." }
elif os.path.dirname(path) != pathPrefix + '/' + username:
response = { "responseType": "ERROR",
"errorCode": 7,
"errorMsg": "Invalid path, directory must be located in " + pathPrefix + '/' + username }
#elif username not in path:
# response = { "responseType": "ERROR",
# "errorCode": 6,
# "errorMsg": "Directory path does not contain the username." }
#elif os.path.dirname(path) != pathPrefix + '/' + username:
# response = { "responseType": "ERROR",
# "errorCode": 7,
# "errorMsg": "Invalid path, directory must be located in " + pathPrefix + '/' + username }
elif self.importReadyQueue.len() >= self.maxReadyJobs:
response = { "responseType": "ERROR",
"errorCode": 8,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment