Skip to content

Commit 9f2cc7d

Browse files
d-w-mooretrel
authored andcommitted
[#170][#3] registered file must be in shared dir
The test routine test_object_names_with_nonprintable_chars( ) failed when running under docker compose (under the Jenkins client dot) due to an attempt to register it from a local directory not shared by the server node.
1 parent 145f874 commit 9f2cc7d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

irods/test/data_obj_test.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import re
1616
import time
1717
import concurrent.futures
18+
import xml.etree.ElementTree
1819

1920
from irods.models import Collection, DataObject
2021
import irods.exception as ex
@@ -1495,9 +1496,9 @@ def enter_file_into_irods( session, filename, **kw_opt ):
14951496
''.join(map(chr,range(1,128))) )
14961497
for opts in [
14971498
{'method':'put', 'options':{}},
1498-
{'method':'register','options':{kw.RESC_NAME_KW: resc_name}}
1499+
{'method':'register','options':{kw.RESC_NAME_KW: resc_name}, 'dir':(test_dir or None)}
14991500
]:
1500-
with NamedTemporaryFile(prefix=opts["method"]+"_"+fname, delete=False) as f:
1501+
with NamedTemporaryFile(prefix=opts["method"]+"_"+fname, dir=opts.get("dir"), delete=False) as f:
15011502
f.write(b'hello')
15021503
temp_names += [f.name]
15031504
ses = helpers.make_session()
@@ -1510,6 +1511,7 @@ def enter_file_into_irods( session, filename, **kw_opt ):
15101511
os.unlink(name)
15111512
if vault:
15121513
self.sess.resources.remove( resc_name )
1514+
self.assertIs( ET(), xml.etree.ElementTree )
15131515

15141516
def test_register_with_xml_special_chars(self):
15151517
test_dir = helpers.irods_shared_tmp_dir()

0 commit comments

Comments
 (0)