Skip to content

Commit

Permalink
[irods#3988][irods#4009][irods#4013] test cases for three issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Kelly committed Jul 13, 2018
1 parent 1a897d1 commit 1b0f0b7
Show file tree
Hide file tree
Showing 7 changed files with 994 additions and 71 deletions.
5 changes: 3 additions & 2 deletions scripts/irods/test/test_chunkydevtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import shutil
import random
import subprocess
import ustrings

from . import session
from .. import test
Expand Down Expand Up @@ -526,7 +527,7 @@ def test_phybun_from_devtest(self):
shutil.copyfile(progname, mysfile)

# iphybun test
self.admin.assert_icommand("iput -rR " + self.testresc + " " + mysdir + " " + irodshome + "/icmdtestp")
self.admin.assert_icommand("iput -rR " + self.testresc + " " + mysdir + " " + irodshome + "/icmdtestp", "STDOUT_SINGLELINE", ustrings.recurse_ok_string())
self.admin.assert_icommand("iphybun -KR " + self.anotherresc + " " + irodshome + "/icmdtestp")
self.admin.assert_icommand("itrim -rS " + self.testresc + " -N1 " +
irodshome + "/icmdtestp", 'STDOUT_SINGLELINE', "files trimmed")
Expand Down Expand Up @@ -725,7 +726,7 @@ def test_large_files_from_devtest(self):
shutil.rmtree(dir_w + "/testz")
self.admin.assert_icommand("iget -vPKr --retries 10 -X " + rsfile + " --lfrestart " + lrsfile +
" --rlock -N 2 " + irodshome + "/icmdtest/testz " + dir_w + "/testz", 'STDOUT_SINGLELINE', "testz")
self.admin.assert_icommand("irsync -r " + dir_w + "/testz i:" + irodshome + "/icmdtest/testz")
self.admin.assert_icommand("irsync -r " + dir_w + "/testz i:" + irodshome + "/icmdtest/testz", "STDOUT_SINGLELINE", ustrings.recurse_ok_string())
self.admin.assert_icommand("irsync -r i:" + irodshome + "/icmdtest/testz " + dir_w + "/testz")
if os.path.isfile(lrsfile):
os.unlink(lrsfile)
Expand Down
21 changes: 11 additions & 10 deletions scripts/irods/test/test_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import time
import shutil
import socket
import ustrings

from .. import test
from . import settings
Expand Down Expand Up @@ -218,7 +219,7 @@ def test_slow_ils_over_federation__ticket_3215(self):

# put dir in remote collection
test_session.assert_icommand(
"iput -r {dir_path} {remote_home_collection}/".format(**parameters))
"iput -r {dir_path} {remote_home_collection}/".format(**parameters), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# time listing of collection
t0 = time.time()
Expand Down Expand Up @@ -254,7 +255,7 @@ def test_iput_r(self):

# put dir in remote collection
test_session.assert_icommand(
"iput -r {dir_path} {remote_home_collection}/".format(**parameters))
"iput -r {dir_path} {remote_home_collection}/".format(**parameters), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# new collection should be there
test_session.assert_icommand(
Expand Down Expand Up @@ -378,7 +379,7 @@ def test_iget_r(self):

# put dir in remote collection
test_session.assert_icommand(
"iput -r {dir_path} {remote_home_collection}/".format(**parameters))
"iput -r {dir_path} {remote_home_collection}/".format(**parameters), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# remove local test dir
shutil.rmtree(dir_path)
Expand Down Expand Up @@ -425,7 +426,7 @@ def test_iget_from_bundle(self):

# put dir in remote collection
remote_session.assert_icommand(
"iput -fr {dir_path} {remote_home_collection}/".format(**parameters))
"iput -fr {dir_path} {remote_home_collection}/".format(**parameters), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# new collection should be there
remote_session.assert_icommand(
Expand Down Expand Up @@ -500,7 +501,7 @@ def test_irm_rf(self):

# put dir in remote collection
test_session.assert_icommand(
"iput -r {dir_path} {remote_home_collection}/".format(**parameters))
"iput -r {dir_path} {remote_home_collection}/".format(**parameters), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# new collection should be there
test_session.assert_icommand(
Expand Down Expand Up @@ -698,7 +699,7 @@ def test_icp_r(self):

# put dir in local collection
test_session.assert_icommand(
"iput -r {dir_path} {local_home_collection}/".format(**parameters))
"iput -r {dir_path} {local_home_collection}/".format(**parameters), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# remove local test dir
shutil.rmtree(dir_path)
Expand Down Expand Up @@ -795,7 +796,7 @@ def test_irsync_r_dir_to_coll(self):

# sync dir with remote collection
test_session.assert_icommand(
"irsync -r {dir_path} i:{remote_home_collection}/{dir_name}".format(**parameters))
"irsync -r {dir_path} i:{remote_home_collection}/{dir_name}".format(**parameters), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# new collection should be there
test_session.assert_icommand(
Expand Down Expand Up @@ -831,7 +832,7 @@ def test_irsync_r_coll_to_coll(self):

# put dir in local collection
test_session.assert_icommand(
"iput -r {dir_path} {local_home_collection}/".format(**parameters))
"iput -r {dir_path} {local_home_collection}/".format(**parameters), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# remove local test dir
shutil.rmtree(dir_path)
Expand Down Expand Up @@ -883,7 +884,7 @@ def test_irsync_r_coll_to_dir(self):

# sync dir with remote collection
test_session.assert_icommand(
"irsync -r {dir_path} i:{remote_home_collection}/{dir_name}".format(**parameters))
"irsync -r {dir_path} i:{remote_home_collection}/{dir_name}".format(**parameters), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# remove local test dir
shutil.rmtree(dir_path)
Expand Down Expand Up @@ -1131,7 +1132,7 @@ def test_msirmcoll(self):

# put dir in remote collection
test_session.assert_icommand(
"iput -r {dir_path} {remote_home_collection}/".format(**parameters))
"iput -r {dir_path} {remote_home_collection}/".format(**parameters), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# new collection should be there
test_session.assert_icommand(
Expand Down
5 changes: 3 additions & 2 deletions scripts/irods/test/test_iadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import subprocess
import time
import tempfile
import ustrings

from ..configuration import IrodsConfig
from ..controller import IrodsController
Expand Down Expand Up @@ -279,8 +280,8 @@ def test_resource_hierarchy_manipulation(self):
lib.create_directory_of_small_files(dir2, tree2)

# add files
self.admin.assert_icommand("iput -R %s -r %s" % ("pt", dir1))
self.admin.assert_icommand("iput -R %s -r %s" % ("replB", dir2))
self.admin.assert_icommand("iput -R %s -r %s" % ("pt", dir1), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())
self.admin.assert_icommand("iput -R %s -r %s" % ("replB", dir2), "STDOUT_SINGLELINE", ustrings.recurse_ok_string())

# debugging
self.admin.assert_icommand("ils -L %s" % dir1, 'STDOUT_SINGLELINE', dir1)
Expand Down
Loading

0 comments on commit 1b0f0b7

Please sign in to comment.