Skip to content

Commit

Permalink
Tests: Change download target for test_download_pfn, added custom err…
Browse files Browse the repository at this point in the history
…or message #6506
  • Loading branch information
voetberg authored and bari12 committed Mar 19, 2024
1 parent 8e54dd8 commit 1117e15
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/test_bin_rucio.py
Expand Up @@ -685,11 +685,15 @@ def test_download_pfn(self):
print(out, err)

# download files
download_dir = "/temp"
replica_pfn = list(self.replica_client.list_replicas([{'scope': self.user, 'name': name}]))[0]['rses'][self.def_rse][0]
cmd = 'rucio -v download --rse {0} --pfn {1} {2}:{3}'.format(self.def_rse, replica_pfn, self.user, name)
cmd = f'rucio -v download --dir {download_dir} --rse {self.def_rse} --pfn {replica_pfn} {self.user}:{name}'
exitcode, out, err = execute(cmd)
print(out, err)
assert re.search('Total files.*1', out) is not None

if "Access to local destination denied." in err: # Known issue - see #6506
assert False, "test `test_download_pfn` unable to access file {self.user}/{name} in {download_dir}"
else:
assert re.search('Total files.*1', out) is not None

try:
for i in listdir('data13_hip'):
Expand Down

0 comments on commit 1117e15

Please sign in to comment.